-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
29 lines (22 loc) · 846 Bytes
/
App.js
File metadata and controls
29 lines (22 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import "./App.css";
import { useState } from "react";
import Header from "./components/Header/Header";
import Footer from "./components/Footer/Footer";
import ProjectsSection from "./sections/Projects/ProjectsSection";
import AboutSection from "./sections/About/AboutSection";
import ContactSection from "./sections/Contact/ContactSection";
function App() {
const [activeSection, setActiveSection] = useState("about");
return (
<div className="App">
<Header active={activeSection} onNavClick={setActiveSection} />
<main className="content">
{activeSection === "projects" && <ProjectsSection />}
{activeSection === "about" && <AboutSection />}
{activeSection === "contact" && <ContactSection />}
</main>
{activeSection !== "about" && <Footer />}
</div>
);
}
export default App;