-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- using ArnaudBarre/eslint-plugin-react-refresh#25 fix eslint warn of react-refresh
- Loading branch information
1 parent
b4d0d99
commit be7e67a
Showing
7 changed files
with
102 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from 'react' | ||
|
||
type PropTypes = {} | ||
|
||
const Login: FC<PropTypes> = () => { | ||
return ( | ||
<> | ||
<div>Login</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from 'react' | ||
|
||
type PropTypes = {} | ||
|
||
const Register: FC<PropTypes> = () => { | ||
return ( | ||
<> | ||
<div>Register</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from 'react' | ||
|
||
type PropTypes = {} | ||
|
||
const Home: FC<PropTypes> = () => { | ||
return ( | ||
<> | ||
<div>Home</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from 'react' | ||
|
||
type PropTypes = {} | ||
|
||
const NotFound: FC<PropTypes> = () => { | ||
return ( | ||
<> | ||
<div>NotFound</div> | ||
</> | ||
) | ||
} | ||
|
||
export default NotFound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from 'react' | ||
|
||
type PropTypes = {} | ||
|
||
const Edit: FC<PropTypes> = () => { | ||
return ( | ||
<> | ||
<div>Edit</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,44 @@ | ||
import React from 'react' | ||
import { createBrowserRouter } from 'react-router-dom' | ||
import { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom' | ||
|
||
const Home = React.lazy(() => import('@/pages/Home')) | ||
const Login = React.lazy(() => import('@/pages/Account/Login')) | ||
const Register = React.lazy(() => import('@/pages/Account/Register')) | ||
const List = React.lazy(() => import('@/pages/Manage/List')) | ||
const Edit = React.lazy(() => import('@/pages/Survey/Edit')) | ||
const NotFound = React.lazy(() => import('@/pages/NotFound')) | ||
|
||
const router = createBrowserRouter([ | ||
const routes: RouteObject[] = [ | ||
{ | ||
path: '/', | ||
element: <Home />, | ||
}, | ||
{ | ||
path: '/login', | ||
element: <Login />, | ||
}, | ||
{ | ||
path: '/register', | ||
element: <Register />, | ||
}, | ||
{ | ||
path: '/list', | ||
element: <List />, | ||
}, | ||
]) | ||
{ | ||
path: '/edit', | ||
element: <Edit />, | ||
}, | ||
{ | ||
path: '*', | ||
element: <NotFound />, | ||
}, | ||
] | ||
|
||
const router = createBrowserRouter(routes) | ||
|
||
const Routes: React.FC = () => { | ||
return <RouterProvider router={router} /> | ||
} | ||
|
||
export default router | ||
export default Routes |