Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove high school application #63

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ module.exports = (phase, { defaultConfig }) => {
destination: '/programs/workforce/infoSession',
permanent: true,
},
// uncomment to add redirect (when form is not available)
// {
// source: '/programs/highschool/apply',
// destination: '/programs/highschool',
// permanent: false,
// },
/**
* High School Application - `/programs/highschool/apply`
* comment/uncomment to remove/add redirect (when high school form is (un)available)
* Also toggle `SHOW_HS_APPLICATION` in src/components/Navbar/BonusBar.tsx
*/
{
source: '/programs/highschool/apply',
destination: '/programs/highschool',
permanent: false,
},
{
source: '/privacy',
destination: '/privacyPolicy',
Expand Down
9 changes: 8 additions & 1 deletion src/components/Navbar/BonusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import NavLink from './elements/NavLink';

const BonusBar = ({ children }: { children?: ReactNode }) => {
const router = useRouter();
const SHOW_HS_APPLICATION = true;
/**
* High School Application - `/programs/highschool/apply`
* - `true` - Show high school application button
* - Uncomment redirect in [next.config.js](../../../next.config.js)
* - `false` - Hide high school application button
* - Comment out redirect in [next.config.js](../../../next.config.js)
*/
const SHOW_HS_APPLICATION = false;

const checkIsPath = (...paths: string[]) => {
return paths.reduce((isPath, path) => {
Expand Down