mirror of
https://github.com/TurTaskProject/TurTaskWeb.git
synced 2025-12-19 05:54:07 +01:00
Separate Login and Signup
This commit is contained in:
parent
ff84f020e3
commit
dbb70d8af6
@ -1,40 +1,45 @@
|
|||||||
import './App.css';
|
import "./App.css";
|
||||||
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||||
|
|
||||||
import TestAuth from './components/testAuth';
|
import TestAuth from "./components/testAuth";
|
||||||
import LoginPage from './components/authentication/LoginPage';
|
import LoginPage from "./components/authentication/LoginPage";
|
||||||
import SignUpPage from './components/authentication/SignUpPage';
|
import SignUpPage from "./components/authentication/SignUpPage";
|
||||||
import NavBar from './components/nav/Navbar';
|
import NavBar from "./components/nav/Navbar";
|
||||||
import Home from './components/Home';
|
import Home from "./components/Home";
|
||||||
import ProfileUpdate from './components/ProfileUpdatePage';
|
import ProfileUpdate from "./components/ProfileUpdatePage";
|
||||||
import Calendar from './components/calendar/calendar';
|
import Calendar from "./components/calendar/calendar";
|
||||||
import KanbanBoard from './components/kanbanBoard/kanbanBoard';
|
import KanbanBoard from "./components/kanbanBoard/kanbanBoard";
|
||||||
import IconSideNav from './components/IconSideNav';
|
import IconSideNav from "./components/IconSideNav";
|
||||||
import Eisenhower from './components/EisenhowerMatrix/Eisenhower';
|
import Eisenhower from "./components/eisenhowerMatrix/Eisenhower";
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
return (
|
const currentPath = window.location.pathname;
|
||||||
<BrowserRouter>
|
const prevention = ["/login", "/signup"];
|
||||||
<div className='display: flex'>
|
|
||||||
<IconSideNav />
|
return (
|
||||||
<div className='flex-1'>
|
<BrowserRouter>
|
||||||
<NavBar />
|
<div className="display: flex">
|
||||||
<div className='flex items-center justify-center'>
|
{!prevention.some(_ => currentPath.includes(_)) && <IconSideNav />}
|
||||||
<Routes>
|
<div className="flex-1">
|
||||||
<Route path="/" element={<Home />} />
|
<NavBar />
|
||||||
<Route path="/tasks" element={<KanbanBoard />} />
|
<div className="flex items-center justify-center">
|
||||||
<Route path="/login" element={<LoginPage />} />
|
<Routes>
|
||||||
<Route path="/signup" element={<SignUpPage />} />
|
<Route path="/" element={<Home />} />
|
||||||
<Route path="/testAuth" element={<TestAuth />} />
|
<Route path="/tasks" element={<KanbanBoard />} />
|
||||||
<Route path="/update_profile" element={<ProfileUpdate />} />
|
<Route path="/testAuth" element={<TestAuth />} />
|
||||||
<Route path="/calendar" element={<Calendar />} />
|
<Route path="/update_profile" element={<ProfileUpdate />} />
|
||||||
<Route path="/priority" element={<Eisenhower/>} />
|
<Route path="/calendar" element={<Calendar />} />
|
||||||
</Routes>
|
<Route path="/priority" element={<Eisenhower />} />
|
||||||
</div>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BrowserRouter>
|
</div>
|
||||||
);
|
<Routes>
|
||||||
}
|
<Route path="/login" element={<LoginPage />} />
|
||||||
|
<Route path="/signup" element={<SignUpPage />} />
|
||||||
|
</Routes>
|
||||||
|
</BrowserRouter>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user