mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
32 lines
874 B
TypeScript
32 lines
874 B
TypeScript
import { MantineProvider } from '@mantine/core';
|
|
import '@mantine/core/styles.css';
|
|
import '@mantine/notifications/styles.css';
|
|
|
|
import '/@/shared/styles/global.css';
|
|
|
|
import { useEffect } from 'react';
|
|
|
|
import { Shell } from '/@/remote/components/shell';
|
|
import { useIsDark, useReconnect } from '/@/remote/store';
|
|
import { useAppTheme } from '/@/renderer/themes/use-app-theme';
|
|
import { AppTheme } from '/@/shared/themes/app-theme-types';
|
|
|
|
export const App = () => {
|
|
const isDark = useIsDark();
|
|
const reconnect = useReconnect();
|
|
|
|
useEffect(() => {
|
|
reconnect();
|
|
}, [reconnect]);
|
|
|
|
const { mode, theme } = useAppTheme(isDark ? AppTheme.DEFAULT_DARK : AppTheme.DEFAULT_LIGHT);
|
|
|
|
return (
|
|
<MantineProvider
|
|
defaultColorScheme={mode}
|
|
theme={theme}
|
|
>
|
|
<Shell />
|
|
</MantineProvider>
|
|
);
|
|
};
|