From 262b359553151cb8f78aa2391cfc140ebfdfe020 Mon Sep 17 00:00:00 2001 From: Peter Barnum Date: Fri, 16 Aug 2024 08:20:59 -0600 Subject: [PATCH 1/2] add redirect for `/high-school` --- next.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/next.config.js b/next.config.js index dcb0c304..4656f982 100644 --- a/next.config.js +++ b/next.config.js @@ -92,6 +92,18 @@ module.exports = (phase, { defaultConfig }) => { permanent: false, }, + // High School Program + { + source: '/high-school', + destination: '/programs/highschool', + permanent: true, + }, + { + source: '/highschool', + destination: '/programs/highschool', + permanent: true, + }, + /** * High School Application - `/programs/highschool/apply` * - When high school form is available, set env variable 'HIGHSCHOOL_FORM_ACTIVE' to 'true' otherwise 'false' From 1790a16da997d02fc86b6e82599400abfcc4f62e Mon Sep 17 00:00:00 2001 From: Peter Barnum Date: Fri, 16 Aug 2024 08:24:14 -0600 Subject: [PATCH 2/2] fix type error if env is missing --- next.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 4656f982..68c4f6b8 100644 --- a/next.config.js +++ b/next.config.js @@ -6,7 +6,8 @@ const { validateData } = require('./data/validate'); const { OVERRIDE_NODE_ENV = '', FB_PIXEL_ID, - HIGHSCHOOL_FORM_ACTIVE_UNTIL, + // Default to current date if not set + HIGHSCHOOL_FORM_ACTIVE_UNTIL = new Date().toISOString(), HIGHSCHOOL_FORM_RESPONSES_NAME = '__TAB_NAME_NOT_SET__', } = process.env;