This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathApp.tsx
57 lines (48 loc) · 2.52 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import Footer from "./components/Footer";
import PrimaryNav from "./components/PrimaryNav";
import RepoListWrap from "./components/RepoListWrap";
import { initiatePostHog } from "./lib/analytics";
import { BrowserRouter } from "react-router-dom";
import { Toaster } from "react-hot-toast";
import { SWRConfig } from "swr";
import GradBackground from "./components/GradBackground";
import Hero from "./components/Hero";
import apiFetcher from "./hooks/useSWR";
import getAppVersion from "./lib/appVersion";
console.log(
`%c
██████╗ ██████╗ ███████╗███╗ ██╗ ███████╗ █████╗ ██╗ ██╗ ██████╗███████╗██████╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██╔════╝██╔══██╗██║ ██║██╔════╝██╔════╝██╔══██╗
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ███████╗███████║██║ ██║██║ █████╗ ██║ ██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ╚════██║██╔══██║██║ ██║██║ ██╔══╝ ██║ ██║
╚██████╔╝██║ ███████╗██║ ╚████║ ███████║██║ ██║╚██████╔╝╚██████╗███████╗██████╔╝
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚══════╝╚═════╝%c v${getAppVersion()}`,
"color:#f6d82b",
"color:green;font-weight:bold",
);
const App = (): JSX.Element => {
initiatePostHog();
return (
<SWRConfig
value={{
revalidateOnFocus: false,
fetcher: apiFetcher,
}}
>
<Toaster position="top-right" />
<BrowserRouter>
<div className="App overflow-hidden">
<GradBackground>
<PrimaryNav />
<Hero />
</GradBackground>
<div className="bg-darkestGrey">
<RepoListWrap />
</div>
<Footer />
</div>
</BrowserRouter>
</SWRConfig>
);
};
export default App;