mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
35 lines
766 B
TypeScript
35 lines
766 B
TypeScript
import { render } from 'preact';
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
import App from './App';
|
|
import { initI18n } from './lib/i18n';
|
|
import { registerNodeWardenServiceWorker } from './lib/pwa';
|
|
import './tailwind.css';
|
|
import './styles.css';
|
|
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: 1,
|
|
refetchOnWindowFocus: false,
|
|
staleTime: 30_000,
|
|
},
|
|
},
|
|
});
|
|
|
|
const root = document.getElementById('root')!;
|
|
root.setAttribute('translate', 'no');
|
|
|
|
function renderApp(): void {
|
|
render(
|
|
<QueryClientProvider client={queryClient}>
|
|
<App />
|
|
</QueryClientProvider>,
|
|
root
|
|
);
|
|
}
|
|
|
|
void initI18n().finally(() => {
|
|
renderApp();
|
|
registerNodeWardenServiceWorker();
|
|
});
|