Skip to content

Commit 49cba96

Browse files
committed
feat: add NotFound page
1 parent 42990ae commit 49cba96

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

โ€Žsrc/main.tsxโ€Ž

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
44
import './styles/index.css';
55
import App from './App.tsx';
66
import TextInputForm from './pages/InputFormTest.tsx';
7+
import { NotFound } from './pages/notfound.tsx';
78

89
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
910

1011
const router = createBrowserRouter([
1112
{
1213
path: '/',
1314
element: <App />,
15+
errorElement: <NotFound />,
1416
},
17+
1518
{
16-
path: '/test/inputForm',
17-
element: <TextInputForm />,
19+
path: '/test',
20+
children: [
21+
{
22+
path: 'inputForm',
23+
element: <TextInputForm />,
24+
},
25+
],
1826
},
1927
]);
2028
const queryClient = new QueryClient();

0 commit comments

Comments
ย (0)