The missing page component can be used to display an error message and "return to homepage" button when an error occurs.
Examples
Basic missing page
A basic missing page component informs users that an error has occurred. It also includes a button link, which users can select to return to the homepage.
We lost that page
Let's find you a new one. Try a new search or return home.
Props
MissingPage
Name | Type | Default | Description |
---|---|---|---|
bodyText | string | "Let's find you a new one. Try a new search or return home." | The body text for the invalid object message |
headingLevel | No type info | 'h1' | |
ouiaId | string | number | "MissingPage" | Custom OUIA ID |
titleText | string | 'We lost that page' | The title for the invalid object message |
toHomePageText | React.ReactNode | 'Return to homepage' | The text label for the link that points back to the home page |
toHomePageUrl | string | window.location.origin | The URL that the home page link points to |