-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
44 lines (38 loc) · 1.11 KB
/
App.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import Navbar from "./Components/Navbar/Navbar";
import "./App.css";
import Intro from "./Components/Intro/Intro";
import Services from "./Components/Services/Services";
import Experience from "./Components/Experience/Experience";
import Works from "./Components/Works/Works";
import PortFolio from "./Components/Portfolio/PortFolio";
import Contact from "./Components/Contact/Contact";
import Footer from "./Components/Footer/Footer";
import { themeContext } from "./Components/ToggleContext/Context";
import { useEffect, useState } from "react";
function App() {
const [darkMode, setDarkMode] = useState(true);
useEffect(() => {
console.log("App component has rendered again...");
}, [darkMode])
return (
<themeContext.Provider value={{darkMode,setDarkMode}}>
<div
className="App"
style={{
background: darkMode ? 'black' : '',
color: darkMode ? 'white' : ''
}}
>
<Navbar />
<Intro />
<Services />
<Experience />
<Works />
<PortFolio />
<Contact />
<Footer />
</div>
</themeContext.Provider>
);
}
export default App;