| import React, { useState } from 'react'; | |
| import { Routes, Route, useLocation } from 'react-router-dom'; | |
| import Header from './components/Header'; | |
| import Navigation from './components/Navigation'; | |
| import Footer from './components/Footer'; | |
| import Home from './pages/Home'; | |
| import Publications from './pages/Publications'; | |
| import Projects from './pages/Projects'; | |
| import Blog from './pages/Blog'; | |
| import Resume from './pages/Resume'; | |
| import './App.css'; | |
| function App() { | |
| const location = useLocation(); | |
| const [theme, setTheme] = useState('light'); | |
| const toggleTheme = () => { | |
| setTheme(theme === 'light' ? 'dark' : 'light'); | |
| }; | |
| return ( | |
| <div className={`app ${theme}`}> | |
| <Header toggleTheme={toggleTheme} theme={theme} /> | |
| <Navigation currentPath={location.pathname} /> | |
| <main className="container mx-auto px-4 py-8"> | |
| <Routes> | |
| <Route path="/" element={<Home />} /> | |
| <Route path="/publications" element={<Publications />} /> | |
| <Route path="/projects" element={<Projects />} /> | |
| {/* <Route path="/blog" element={<Blog />} /> */} | |
| <Route path="/resume" element={<Resume />} /> | |
| </Routes> | |
| </main> | |
| <Footer /> | |
| </div> | |
| ); | |
| } | |
| export default App; |