Files
maestro/ui/src/main.tsx
T
oss-sync d061ad08d8
CI / build-and-test (push) Has been cancelled
sync: update from private repo (e62f5c7)
2026-06-11 01:52:48 +00:00

26 lines
877 B
TypeScript

import { createRoot } from 'react-dom/client';
import { QueryClientProvider } from '@tanstack/react-query';
import { App } from './App';
import { queryClient } from './lib/queryClient';
import { initTheme } from './lib/theme';
import './i18n'; // initialize i18next (en/ja) before first render
import './index.css';
// Keep [data-theme] in sync with the OS while pref is 'system'. The initial
// attribute is already set pre-paint by the inline script in index.html.
initTheme();
createRoot(document.getElementById('root')!).render(
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
);
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/ui/sw.js', { scope: '/ui/' }).catch(() => {
// Registration failures are non-fatal — the app works without the SW.
});
});
}