-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DefaultGenericErrorPage from plain js to typescript
- Loading branch information
Showing
4 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
import React from "react"; | ||
|
||
import {ThemeProvider, Typography} from "@mui/material"; | ||
import theme from "../component/styles"; | ||
import Template from "../component/Template"; | ||
import {SentimentVeryDissatisfied} from "@mui/icons-material"; | ||
|
||
interface DefaultGenericErrorPageProps { | ||
messages: string | ||
} | ||
interface ErrorMessage { | ||
defaultMessage: string | ||
} | ||
|
||
const DefaultGenericErrorPage: React.FC<DefaultGenericErrorPageProps> = ({messages}) => { | ||
let errors : ErrorMessage = JSON.parse(messages) | ||
return <ThemeProvider theme={theme}> | ||
<Template maxWidth="sm"> | ||
<Typography variant="h3" component="h3"> | ||
<SentimentVeryDissatisfied fontSize="large"/> {errors.defaultMessage} | ||
</Typography> | ||
|
||
</Template> | ||
</ThemeProvider> | ||
|
||
} | ||
|
||
export default DefaultGenericErrorPage |
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