From 02d165829f0d050d2690fbe720e29ac26a855bbc Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 10 Nov 2025 18:54:09 +0100 Subject: [PATCH] Move to / --- web/pages/home.tsx | 11 ----------- web/pages/index.tsx | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/web/pages/home.tsx b/web/pages/home.tsx index ca1ad4a8..38e9f587 100644 --- a/web/pages/home.tsx +++ b/web/pages/home.tsx @@ -2,17 +2,6 @@ import {PageBase} from 'web/components/page-base' import {Col} from 'web/components/layout/col' import {LoggedOutHome} from "web/components/home/home"; -export const TEST_DOWNTIME = true - -export async function getServerSideProps() { - if (TEST_DOWNTIME) { - // This will cause Next.js to return a 500 *at runtime* - throw new Error('500 - Test downtime'); - } - - return { props: {} }; -} - export default function Home() { return ( diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 936d10a5..c9e3acbf 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -4,7 +4,18 @@ import {useUser} from 'web/hooks/use-user' import {LoggedOutHome} from "web/components/home/home"; import {ProfilesHome} from "web/components/profiles/profiles-home"; +export const TEST_DOWNTIME = true +// To simulate downtime, you need the error to happen at runtime, not at build time. +// That means the page must be server-rendered, not statically generated. +export async function getServerSideProps() { + if (TEST_DOWNTIME) { + // This will cause Next.js to return a 500 *at runtime* + throw new Error('500 - Test downtime'); + } + + return { props: {} }; +} export default function ProfilesPage() { const user = useUser();