Chap05 -> Handling routes not found
parent
fbc2541230
commit
5b79adea19
|
@ -9,6 +9,7 @@ import { fontFamily, fontSize, gray2 } from './Styles';
|
|||
import { AskPage } from './AskPage';
|
||||
import { SearchPage } from './SearchPage';
|
||||
import { SignInPage } from './SignInPage';
|
||||
import { NotFoundPage } from './NotFoundPage';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
|
@ -25,6 +26,7 @@ function App() {
|
|||
<Route path="search" element={<SearchPage />} />
|
||||
<Route path="ask" element={<AskPage />} />
|
||||
<Route path="signin" element={<SignInPage />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
import React from 'react';
|
||||
import { Page } from './Page';
|
||||
|
||||
export const NotFoundPage = () => <Page title="Page Not Found">{null}</Page>;
|
Loading…
Reference in New Issue