Skip to content

Commit

Permalink
404 page を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kuramapommel committed Aug 27, 2024
1 parent 6ef3f53 commit 3d8acfe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sample/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Link } from 'react-router-dom'

const NotFoundPage = () => (
<>
<h1>404 NOT FOUND</h1>
<p>お探しのページは見つかりませんでした。</p>
<Link to="/">戻る</Link>
</>
)

export default NotFoundPage
2 changes: 2 additions & 0 deletions sample/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useDataProvider } from './hooks/use-data-provider'
import Login from './pages/login'
import ProductList from './pages/product-list'
import Tenant from './pages/tenant'
import NotFoundPage from './pages/404'

const Routes = () => {
const dataProvider = useDataProvider()
Expand All @@ -17,6 +18,7 @@ const Routes = () => {
path="/tenant/*"
element={<Tenant dataProvider={dataProvider} />}
/>
<Route path="*" element={<NotFoundPage />} />
</RrdRoutes>
)
}
Expand Down

0 comments on commit 3d8acfe

Please sign in to comment.