🐛 Fix DISABLE_LANDING_PAGE not working (#572)

This commit is contained in:
Luke Vella 2023-03-16 10:59:32 +00:00 committed by GitHub
parent 5962b6c8f1
commit 86eaf5df10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -40,8 +40,7 @@ const nextConfig = {
return [ return [
{ {
source: "/", source: "/",
destination: destination: "/home",
process.env.DISABLE_LANDING_PAGE === "true" ? "/new" : "/home",
}, },
]; ];
}, },

View file

@ -12,7 +12,7 @@ export const getServerSideProps: GetServerSideProps = composeGetServerSideProps(
async () => { async () => {
// TODO (Luke Vella) [2023-03-14]: Remove this once we split the app from the landing page // TODO (Luke Vella) [2023-03-14]: Remove this once we split the app from the landing page
if (process.env.DISABLE_LANDING_PAGE === "true") { if (process.env.DISABLE_LANDING_PAGE === "true") {
return { notFound: true }; return { redirect: { destination: "/new", permanent: false } };
} }
return { props: {} }; return { props: {} };
}, },