routing
This commit is contained in:
@@ -3,16 +3,16 @@ import { Routes, Route, Navigate } from 'react-router-dom';
|
||||
|
||||
import { URLs } from './__data__/urls';
|
||||
|
||||
const Hello = () => <h1>Hello</h1>;
|
||||
import HomePage from './pages/HomePage.jsx'
|
||||
import Hello from './pages/Hello.jsx'
|
||||
import Account from './pages/Account.jsx'
|
||||
|
||||
export const Dashboard = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route
|
||||
path={URLs.baseUrl}
|
||||
element={<Navigate replace to={URLs.auth.url} />}
|
||||
/>
|
||||
<Route path={URLs.auth.url} element={<Hello />} />
|
||||
<Route path={URLs.baseUrl} element={<HomePage/>}/>
|
||||
<Route path={URLs.auth.url} element={<Hello/>} />
|
||||
<Route path={URLs.account.url} element={<Account/>}/>
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user