porridger/front/src/App.tsx
2023-07-13 20:03:53 +03:00

31 lines
691 B
TypeScript

import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
import { HomePage, AddPage, LoginPage, UserPage } from './pages'
import { WithToken } from './components'
import 'leaflet/dist/leaflet.css'
import './App.css'
function App() {
return (
<Router>
<Routes>
<Route index element={<HomePage />} />
<Route path='/add' element={
<WithToken>
<AddPage />
</WithToken>
} />
<Route path='/user' element={
<WithToken>
<UserPage />
</WithToken>
} />
<Route path='/login' element={<LoginPage />} />
</Routes>
</Router>
)
}
export default App