Skip to content

Commit

Permalink
chore: error page setup and footer height fix
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzracharyeah-rejan committed Jul 6, 2023
1 parent 72b0558 commit b1a77f0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
Binary file added public/assets/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Dashboard from './scenes/Dashboard';
import Mock from './scenes/Mock';
import Shop from './scenes/Shop';
import Contact from './scenes/Contact';
import Error from './scenes/Error';

const App = () => {
const mode = useAppSelector((state) => state.global.mode) as PaletteMode;
Expand All @@ -27,6 +28,7 @@ const App = () => {
<Route path='/shop' element={<Shop />} />
<Route path='/contact' element={<Contact />} />
<Route path='/mock' element={<Mock />} />
<Route path='*' element={<Error />} />
</Route>
</Routes>
</ThemeProvider>
Expand Down
31 changes: 31 additions & 0 deletions src/scenes/Error/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Box, Button, Container, Typography } from '@mui/material';
import FlexBetween from '../../components/FlexBetween';
import { useNavigate } from 'react-router-dom';

const Error = () => {
const navigate = useNavigate();
return (
<Container maxWidth='lg' sx={{ p: '5.5rem 0' }}>
<FlexBetween sx={{ flexDirection: 'column', gap: '2.5rem' }}>
<Box component='img' src='/assets/error.png' alt='error' />
<Box>
<Typography variant='h4' textAlign={'center'} p='1rem 0' fontWeight={600}>
Opps!
</Typography>
<Typography
variant='subtitle1'
width={292}
textAlign={'center'}
lineHeight={2}
letterSpacing={1.5}
>
We’re sorry. The page you requested could not be found.
</Typography>
<Button onClick={() => navigate('/home')}>Back to the home page</Button>
</Box>
</FlexBetween>
</Container>
);
};

export default Error;
2 changes: 1 addition & 1 deletion src/scenes/Footer/footer.styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.footer {
width: 100%;
height: 505px;
height: 300px;
}

.footer__meta-title {
Expand Down

0 comments on commit b1a77f0

Please sign in to comment.