feat: implement project scaffolding with brutalist UI components and homepage routing

This commit is contained in:
Kevin Satria D
2026-05-20 13:53:45 +07:00
parent 26c9b4b362
commit a3ae3bfcfe
10 changed files with 430 additions and 60 deletions

View File

@@ -1,20 +1,37 @@
import { BrowserRouter, Routes, Route, useLocation } from 'react-router-dom';
import { useEffect } from 'react';
import Navbar from './components/Navbar';
import Hero from './components/Hero';
import EventSection from './components/EventSection';
import Footer from './components/Footer';
import Home from './pages/Home';
import AllEvents from './pages/AllEvents';
function ScrollToTop() {
const { pathname } = useLocation();
useEffect(() => {
window.scrollTo(0, 0);
}, [pathname]);
return null;
}
function App() {
return (
<div className="min-h-screen bg-brutal-bg text-black font-sans selection:bg-brutal-pink selection:text-black flex flex-col">
<Navbar />
<main className="flex-1 flex flex-col">
<Hero />
<EventSection />
</main>
<BrowserRouter>
<ScrollToTop />
<div className="min-h-screen bg-brutal-bg text-black font-sans selection:bg-brutal-pink selection:text-black flex flex-col">
<Navbar />
<main className="flex-1 flex flex-col">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/events" element={<AllEvents />} />
</Routes>
</main>
<Footer />
</div>
<Footer />
</div>
</BrowserRouter>
);
}