Files
suwayomi-material-you-webui/src/index.tsx

37 lines
1.1 KiB
TypeScript
Raw Normal View History

/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
2021-01-26 23:32:12 +03:30
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
2021-01-26 23:32:12 +03:30
import '@/polyfill.manual';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
2023-10-28 00:32:02 +02:00
import { App } from '@/App';
import '@/index.css';
2020-12-24 15:02:03 +03:30
// roboto font
import '@fontsource/roboto';
2024-10-05 16:09:34 +02:00
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
2024-05-21 20:45:13 +02:00
import '@/lib/dayjs/Setup.ts';
2024-05-02 22:14:34 +02:00
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister().catch(defaultPromiseErrorHandler('unregister service workers'));
if (caches) {
caches.keys().then(async (names) => {
await Promise.all(names.map((name) => caches.delete(name)));
});
}
});
}
2020-12-24 15:02:03 +03:30
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
<StrictMode>
2020-12-24 16:50:50 +01:00
<App />
</StrictMode>,
);