Skip to content

Commit

Permalink
🐛 Fix DISABLE_LANDING_PAGE not working (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Mar 16, 2023
1 parent 5962b6c commit 86eaf5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ const nextConfig = {
return [
{
source: "/",
destination:
process.env.DISABLE_LANDING_PAGE === "true" ? "/new" : "/home",
destination: "/home",
},
];
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getServerSideProps: GetServerSideProps = composeGetServerSideProps(
async () => {
// TODO (Luke Vella) [2023-03-14]: Remove this once we split the app from the landing page
if (process.env.DISABLE_LANDING_PAGE === "true") {
return { notFound: true };
return { redirect: { destination: "/new", permanent: false } };
}
return { props: {} };
},
Expand Down

0 comments on commit 86eaf5d

Please sign in to comment.