forked from w3f-webops/polkadot-staking-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
32 lines (28 loc) · 951 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
31
32
// Copyright 2023 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only
import type { FC } from 'react';
import { I18nextProvider } from 'react-i18next';
import { DefaultNetwork } from 'consts';
import { ThemesProvider } from 'contexts/Themes';
import { i18next } from 'locale';
import { Providers } from 'Providers';
import { NetworkProvider } from 'contexts/Network';
import { ActiveAccountsProvider } from 'contexts/ActiveAccounts';
export const App: FC = () => {
let network = localStorage.getItem('network');
if (network === null) {
network = DefaultNetwork;
localStorage.setItem('network', network);
}
return (
<I18nextProvider i18n={i18next}>
<ThemesProvider>
<NetworkProvider>
<ActiveAccountsProvider>
<Providers />
</ActiveAccountsProvider>
</NetworkProvider>
</ThemesProvider>
</I18nextProvider>
);
};