-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [open-formulieren/open-forms#5033] User friendly error in case of 503
- Loading branch information
1 parent
385816d
commit e0948b7
Showing
2 changed files
with
33 additions
and
13 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
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 @@ | ||
import {FormattedMessage, useIntl} from 'react-intl'; | ||
|
||
import ErrorMessage from 'components/Errors/ErrorMessage'; | ||
|
||
const FormUnavailable = ({wrapper: Wrapper}) => { | ||
const intl = useIntl(); | ||
// Wrapper may be a DOM element, which can't handle <FormattedMessage /> | ||
const title = intl.formatMessage({ | ||
description: 'Open Forms service unavailable error title', | ||
defaultMessage: 'Form unavailable', | ||
}); | ||
return ( | ||
<Wrapper title={title}> | ||
<ErrorMessage modifier="error"> | ||
<FormattedMessage | ||
description="Open Forms service unavailable error message" | ||
defaultMessage="Unfortunately, this form is currently unavailable due to an outage. Please try again later." | ||
/> | ||
</ErrorMessage> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
export default FormUnavailable; |