-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | ||
import { BrowserRouter as Router, Routes, Route, Outlet } from 'react-router-dom'; | ||
|
||
import Home from './components/Home'; | ||
import Body from './components/Body'; | ||
import Login from './Pages/Login'; | ||
import Signup from './Pages/SIgnup'; | ||
import Signup from './Pages/SIgnup'; // Fix casing for Signup | ||
import Dashboard from './Pages/Dashboard'; | ||
import Profile from './Pages/profile'; | ||
import Footer from './components/Footer'; | ||
import Quiz from './Pages/Quiz'; | ||
import Navbar from './components/Navbar'; | ||
|
||
function App() { | ||
const Layout = () => { | ||
return ( | ||
<Router> | ||
<div className="flex flex-col min-h-screen"> | ||
|
||
<Navbar /> | ||
|
||
|
||
<div className="flex-grow"> | ||
<Routes> | ||
|
||
<Route path="/" element={<Home />} /> | ||
<div className="flex flex-col min-h-screen"> | ||
<Home /> | ||
<div className="flex-grow"> | ||
<Outlet /> | ||
</div> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
|
||
|
||
<Route path="/dashboard" element={<Dashboard />} /> | ||
<Route path="/" element={<Body />} /> | ||
<Route path="/login" element={<Login />} /> | ||
<Route path="/signup" element={<Signup />} /> | ||
<Route path="/profile" element={<Profile />} /> | ||
<Route path="/quiz" element={<Quiz />} /> | ||
</Routes> | ||
</div> | ||
|
||
|
||
<Footer /> | ||
</div> | ||
function App() { | ||
return ( | ||
<Router> | ||
<Routes> | ||
|
||
<Route path="/" element={<Layout />}> | ||
<Route path="/" element={<Body />} /> | ||
<Route path="login" element={<Login />} /> | ||
<Route path="signup" element={<Signup />} /> | ||
<Route path="dashboard" element={<Dashboard />} /> | ||
<Route path="profile" element={<Profile />} /> | ||
<Route path='Quiz' element ={<Quiz />}></Route> | ||
</Route> | ||
</Routes> | ||
</Router> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
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
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