-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (27 loc) · 836 Bytes
/
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
import React, { useEffect, useState } from "react";
import { Outlet, RouterProvider } from "react-router-dom";
// import "./App.css";
import Header from "./src/components/Header";
import "./index.css";
import UserContext from "./src/context/UserContext";
import { Provider } from "react-redux";
import appStore from "./src/redux/appStore";
const App = () => {
const [userName, setUserName] = useState();
useEffect(() => {
const data = "Neha";
setUserName(data);
});
return (
<Provider store={appStore}>
<UserContext.Provider value={{ loggedInUser: userName, setUserName }}>
<div className="flex flex-col gap-6 pt-12 relative font-serif">
<Header />
<Outlet />
{/* <Footer /> */}
</div>
</UserContext.Provider>
</Provider>
);
};
export default App;