-
Notifications
You must be signed in to change notification settings - Fork 8
/
App.js
38 lines (35 loc) · 786 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
32
33
34
35
36
37
38
import "./App.css"
import { Provider } from "react-redux"
import store from "./utils/store"
import Body from "./components/Body"
import Header from "./components/Header"
import { createBrowserRouter, RouterProvider } from "react-router-dom"
import MainContainer from "./components/MainContainer"
import WatchPage from "./components/WatchPage"
const appConfig = createBrowserRouter([
{
path: "/",
element: <Body />,
children: [
{
path: "/",
element: <MainContainer />
},
{
path: "watch",
element: <WatchPage />
}
]
}
])
function App() {
return (
<div>
<Provider store={store}>
<Header />
<RouterProvider router={appConfig} />
</Provider>
</div>
)
}
export default App