-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding default error pages to all routes. Will later customize to eac…
…h page. No other configuration needed, NextJS will automatically wrap all adjacent page files with the error.tsx file
- Loading branch information
1 parent
0dd2a4c
commit 65580ab
Showing
30 changed files
with
2,901 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
24 changes: 24 additions & 0 deletions
24
frontend/app/(hub)/fixeddatainput/quadratpersonnel/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
24 changes: 24 additions & 0 deletions
24
frontend/app/(hub)/fixeddatainput/stemdimensions/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
24 changes: 24 additions & 0 deletions
24
frontend/app/(hub)/fixeddatainput/stemtaxonomies/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
24 changes: 24 additions & 0 deletions
24
frontend/app/(hub)/measurementshub/uploadedfiles/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
24 changes: 24 additions & 0 deletions
24
frontend/app/(hub)/measurementshub/validationhistory/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { Box, Typography, Button } from '@mui/joy'; | ||
|
||
const ErrorPage = ({ error, reset }: { error: Error; reset: () => void }) => { | ||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
reset(); | ||
}, 5000); | ||
return () => clearTimeout(timer); | ||
}, [reset]); | ||
|
||
return ( | ||
<Box sx={{ p: 3, textAlign: 'center' }}> | ||
<Typography level="h1">Something went wrong</Typography> | ||
<Typography level="body-lg">{error.message}</Typography> | ||
<Typography level="body-lg">Retrying in 5 seconds...</Typography> | ||
<Button onClick={reset}>Retry Now</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
Oops, something went wrong.