-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1643 from zetkin/survey-404
Load survey in getServerSideProps and add API downtime + 404 handling
- Loading branch information
Showing
3 changed files
with
61 additions
and
28 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/features/surveys/components/surveyForm/ErrorMessage.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,14 @@ | ||
import Box from '@mui/material/Box'; | ||
import { FC } from 'react'; | ||
import messageIds from 'features/surveys/l10n/messageIds'; | ||
import { Msg } from 'core/i18n'; | ||
|
||
const ErrorMessage: FC = () => { | ||
return ( | ||
<Box bgcolor="#ee878a" mx={4} my={4} p={2} sx={{ borderRadius: '5px' }}> | ||
<Msg id={messageIds.surveyForm.error} /> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ErrorMessage; |
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