File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,17 +2,6 @@ import {PageBase} from 'web/components/page-base'
22import { Col } from 'web/components/layout/col'
33import { LoggedOutHome } from "web/components/home/home" ;
44
5- export const TEST_DOWNTIME = true
6-
7- export async function getServerSideProps ( ) {
8- if ( TEST_DOWNTIME ) {
9- // This will cause Next.js to return a 500 *at runtime*
10- throw new Error ( '500 - Test downtime' ) ;
11- }
12-
13- return { props : { } } ;
14- }
15-
165export default function Home ( ) {
176 return (
187 < PageBase trackPageView = { 'home' } >
Original file line number Diff line number Diff line change @@ -4,7 +4,18 @@ import {useUser} from 'web/hooks/use-user'
44import { LoggedOutHome } from "web/components/home/home" ;
55import { ProfilesHome } from "web/components/profiles/profiles-home" ;
66
7+ export const TEST_DOWNTIME = true
78
9+ // To simulate downtime, you need the error to happen at runtime, not at build time.
10+ // That means the page must be server-rendered, not statically generated.
11+ export async function getServerSideProps ( ) {
12+ if ( TEST_DOWNTIME ) {
13+ // This will cause Next.js to return a 500 *at runtime*
14+ throw new Error ( '500 - Test downtime' ) ;
15+ }
16+
17+ return { props : { } } ;
18+ }
819
920export default function ProfilesPage ( ) {
1021 const user = useUser ( ) ;
You can’t perform that action at this time.
0 commit comments