-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6891264
commit cd349c1
Showing
2 changed files
with
35 additions
and
0 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,32 @@ | ||
import React from 'react'; | ||
import { Box, Typography, Button, Container } from '@mui/material'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
const NotFoundPage = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleGoHome = () => { | ||
navigate('/'); // Redirect to the homepage or change the path as needed | ||
}; | ||
|
||
return ( | ||
<Container maxWidth="md" sx={{ textAlign: 'center', mt: 8 }}> | ||
<Typography variant="h2" color="error" gutterBottom> | ||
404 | ||
</Typography> | ||
<Typography variant="h5" gutterBottom> | ||
Oops! The page you're looking for doesn't exist. | ||
</Typography> | ||
<Typography variant="body1" paragraph> | ||
It looks like the page you're trying to access is not available or the URL is incorrect. | ||
</Typography> | ||
<Box sx={{ mt: 4 }}> | ||
<Button variant="contained" color="primary" size="large" onClick={handleGoHome}> | ||
Go to Home | ||
</Button> | ||
</Box> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default NotFoundPage; |