Skip to content

Commit

Permalink
solved issue of registerpage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauravtb2253 committed Oct 15, 2024
1 parent 5a27a0e commit 04e077c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 49 deletions.
28 changes: 2 additions & 26 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 28 additions & 23 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { useState } from "react";
import { Route, Routes, BrowserRouter as Router} from "react-router-dom";
import {
Route,
Routes,
BrowserRouter as Router,
Outlet,
} from "react-router-dom";
import Hero from "./appComponents/Herosection";
import Clubs from "./appComponents/Clubs";
import Particles from "@/components/magicui/particles";
Expand All @@ -11,12 +16,11 @@ import ClubLogin from "./appComponents/ClubLogin";
import { ClubAdmin } from "./appComponents/ClubAdmin";
import "./App.css";
import QuizPage from "./appComponents/QuizPage";
import Footer from "./appComponents/Footer"; // Import the Footer component
import Footer from "./appComponents/Footer";

import { Navbar } from "./appComponents/Navbar";
import About from "./appComponents/About";


function App() {
const [showPopup, setShowPopup] = useState(true);
const [showLoginPage, setShowLoginPage] = useState(false);
Expand All @@ -29,11 +33,12 @@ function App() {

return (
<Router>
<div className="bg-black font-popins">
<Routes>
<Route
path="/"
element={
<Routes>
<Route
path="/"
element={
<div className="bg-black font-popins">
<Outlet />
<div className="relative overflow-hidden">
<Meteors number={numberOfMeteors} />
<Particles
Expand All @@ -46,22 +51,22 @@ function App() {
<Navbar setShowLoginPage={setShowLoginPage} />
<Hero />
</div>
}
>
<Route path="registerClub" element={<ClubRegistration />} />
</Route>
<Route path="/clubAdmin/*" element={<ClubAdmin />} />
<Route path="/quiz/:id" element={<QuizPage />} />
<Route path="/about" element={<About />} />
</Routes>
<Clubs />
<Events />
{showPopup && <Popup onClose={handleClose} />}
{showLoginPage && <ClubLogin onClose={setShowLoginPage} />}
</div>
<Footer /> {/* Render the Footer component on all routes */}
<Clubs />
<Events />
{showPopup && <Popup onClose={handleClose} />}
{showLoginPage && <ClubLogin onClose={setShowLoginPage} />}
</div>
}
>
<Route path="registerClub" element={<ClubRegistration />} />
</Route>
<Route path="/clubAdmin/*" element={<ClubAdmin />} />
<Route path="/quiz/:id" element={<QuizPage />} />
<Route path="/about" element={<About />} />
</Routes>
<Footer />
</Router>
);
}

export default App;
export default App;

0 comments on commit 04e077c

Please sign in to comment.