Skip to content

Commit

Permalink
Basic 404 page. (#2890)
Browse files Browse the repository at this point in the history
  • Loading branch information
phixMe authored Sep 4, 2024
1 parent 66329d1 commit a586a89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
import { Box, Container, CssBaseline } from '@mui/material'
import { Helmet, HelmetProvider } from 'react-helmet-async'
import { LocalizationProvider } from '@mui/x-date-pickers'
import { NotFound } from '../routes/not-found/NotFound'
import { Provider } from 'react-redux'
import { ReduxRouter, createRouterMiddleware } from '@lagunovsky/redux-react-router'
import { Route, Routes } from 'react-router-dom'
Expand Down Expand Up @@ -69,6 +70,7 @@ const App = (): ReactElement => {
element={<ColumnLevel />}
/>
<Route path={'/lineage/:nodeType/:namespace/:name'} element={<TableLevel />} />
<Route path='*' element={<NotFound />} />
</Routes>
<Toast />
</Box>
Expand Down
23 changes: 23 additions & 0 deletions web/src/routes/not-found/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2018-2024 contributors to the Marquez project
// SPDX-License-Identifier: Apache-2.0

import * as React from 'react'
import { Box } from '@mui/system'
import { Button } from '@mui/material'
import { Link as RouterLink } from 'react-router-dom'
import MqEmpty from '../../components/core/empty/MqEmpty'

export const NotFound = () => {
return (
<Box pt={4} display={'flex'} justifyContent={'center'}>
<MqEmpty title={'Not Found'}>
<>
Sorry, the page you are looking for does not exist.
<Button size={'small'} component={RouterLink} to={'/'}>
Go Home
</Button>
</>
</MqEmpty>
</Box>
)
}

0 comments on commit a586a89

Please sign in to comment.