PageNotFoundPage Component
Light | Dark |
---|---|
The PageNotFoundPage
component is a React component designed to display a user-friendly message when a page is not found (404 error). It provides a visual indication that the requested page is unavailable and offers a button to navigate back to the previous page.
Pre-requisite
-
Ensure you have the
@neo4j-ndl
library installed in your project to use thisPageNotFound
component.
Usage
To integrate the PageNotFoundPage
component into your application, ensure it is part of your routing configuration:
-
Import the component:
import PageNotFoundPage from './path/to/PageNotFoundPage';
-
Add a route for the component in your router setup. This is typically done using a catch-all route:
import { Routes, Route } from 'react-router-dom';
<Routes>
// ... All your other routes MUST be before this one
<Route path="*" element={<PageNotFoundPage />} />
</Routes>