forked from leather-io/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.tsx
42 lines (37 loc) · 1.35 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
import React, { useEffect } from 'react';
import { ThemeProvider, ColorModeProvider } from '@stacks/ui';
import { Toaster } from 'react-hot-toast';
import { theme } from '@common/theme';
import { HashRouter as Router } from 'react-router-dom';
import { GlobalStyles } from '@components/global-styles';
import { VaultLoader } from '@components/vault-loader';
import { AccountsDrawer } from '@features/accounts-drawer/accounts-drawer';
import { NetworksDrawer } from '@features/network-drawer/networks-drawer';
import { Routes } from './routes';
import { SettingsPopover } from '@features/settings-dropdown/settings-popover';
import { AppErrorBoundary } from '@features/errors/app-error-boundary';
export const App: React.FC = () => {
useEffect(() => {
(window as any).__APP_VERSION__ = VERSION;
}, []);
return (
<ThemeProvider theme={theme}>
<GlobalStyles />
<ColorModeProvider defaultMode="light">
<>
<Router>
<AppErrorBoundary>
<VaultLoader />
<Routes />
<AccountsDrawer />
<NetworksDrawer />
<SettingsPopover />
</AppErrorBoundary>
<Toaster position="bottom-center" toastOptions={{ style: { fontSize: '14px' } }} />
</Router>
</>
</ColorModeProvider>
</ThemeProvider>
);
};
export default App;