Skip to content

Commit

Permalink
Update App.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiShankar93 committed Mar 6, 2024
1 parent 1b6ee63 commit 3a99420
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
import React, { useState, useEffect } from "react";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import Footer from "./components/Footer";
import Navbar from "./components/Navbar";
import About from "./components/About";
import About2 from "./components/About2";
import Events from "./components/Events";
import Intro from "./components/Intro";
import Sponsor from "./components/sponsor"
import Sponsor from "./components/Sponsor";
import Register from "./components/register"; // Make sure you have this component created

function App() {
const [showIntro, setShowIntro] = useState(true);

useEffect(() => {
const timer = setTimeout(() => {
setShowIntro(false);
}, 3000);

return () => clearTimeout(timer);
}, []);

return (
<>
<Router>
{showIntro ? (
<Intro />
) : (
<>
<Navbar />
<About />
<About2 />
<Events />
<Sponsor/>
<Footer />
<Routes>
<Route path="/" element={
<>
<About />
<About2 />
<Events />
<Sponsor />
<Footer />
</>
}/>
<Route path="/register" element={<Register />} />
</Routes>
</>
)}
</>
</Router>
);
}

Expand Down

0 comments on commit 3a99420

Please sign in to comment.