-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
30 lines (27 loc) · 908 Bytes
/
App.tsx
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
import React from "react";
import { AppContainer, GlobalStyle } from "./App.styles";
import { ThemeProvider } from "styled-components";
import { THEMES } from "./utils/theme";
import { useAppContext } from "./context/App.context";
import Header from "./components/header/Header";
import ToolTips from "./utils/ToolTips";
import Body from "./components/body/Body";
import { Route, Routes } from "react-router-dom";
import WatchVideoContents from "./components/watchVideoContents/WatchVideoContents";
function App() {
const { theme } = useAppContext();
return (
<ThemeProvider theme={THEMES[theme]}>
<GlobalStyle />
<ToolTips />
<AppContainer>
<Header />
<Routes>
<Route path="/" element={<Body />} />
<Route path="/:id" element={<WatchVideoContents />} />
</Routes>
</AppContainer>
</ThemeProvider>
);
}
export default App;