-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.tsx
More file actions
48 lines (41 loc) · 1.4 KB
/
App.tsx
File metadata and controls
48 lines (41 loc) · 1.4 KB
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
import React from 'react';
import { ConfigProvider } from 'antd';
import { HelmetProvider } from 'react-helmet-async';
import deDe from 'antd/lib/locale/de_DE';
import enUS from 'antd/lib/locale/en_US';
import GlobalStyle from './styles/GlobalStyle';
import 'typeface-montserrat';
import 'typeface-lato';
import { AppRouter } from './components/router/AppRouter';
import { useLanguage } from './hooks/useLanguage';
import { useAutoNightMode } from './hooks/useAutoNightMode';
import { usePWA } from './hooks/usePWA';
import { useThemeWatcher } from './hooks/useThemeWatcher';
import { useFullscreenModalFix } from './hooks/useFullscreenModalFix';
// NDK removed - login uses window.nostr directly, profile API uses panel API
const App: React.FC = () => {
const { language } = useLanguage();
usePWA();
useAutoNightMode();
useThemeWatcher();
useFullscreenModalFix();
return (
<>
<meta name="theme-color" content="#000000" />
<GlobalStyle />
<HelmetProvider>
<ConfigProvider
locale={language === 'en' ? enUS : deDe}
getPopupContainer={() => {
// Always use root element for all Ant Design popups to support fullscreen
const root = document.getElementById('root');
return root || document.body;
}}
>
<AppRouter />
</ConfigProvider>
</HelmetProvider>
</>
);
};
export default App;