Init
This commit is contained in:
31
src/App.js
Normal file
31
src/App.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
import React from 'react';
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom'; // Исправленный импорт
|
||||
import Login from './Login';
|
||||
import Profile from './Profile';
|
||||
import Registration from './Registration';
|
||||
import Mainpage from './Mainpage';
|
||||
import KBBoardsList from './KBBoardsList';
|
||||
import KBBoard from './KBBoard';
|
||||
import OtherProfile from './OtherProfile';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/profile" element={<Profile />} />
|
||||
<Route path="/registration" element={<Registration />} />
|
||||
<Route path="/main" element={<Mainpage />} />
|
||||
<Route path="/kanban-boards-list" element={<KBBoardsList />} />
|
||||
<Route path="/kanban-board/:id" element={<KBBoard />} />
|
||||
<Route path="/profile/:id" element={<OtherProfile />} />
|
||||
{/* Корректный редирект на страницу входа */}
|
||||
<Route path="*" element={<Mainpage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user