31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { ScrollViewStyleReset } from "expo-router/html";
|
|
import type { PropsWithChildren } from "react";
|
|
|
|
const serviceWorkerBootstrap = `
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/service-worker.js').catch(() => {});
|
|
});
|
|
}
|
|
`;
|
|
|
|
export default function Root({ children }: PropsWithChildren) {
|
|
return (
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charSet="utf-8" />
|
|
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
<meta name="theme-color" content="#030213" />
|
|
<meta name="description" content="Помощник по документам и жизни в России" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<link rel="icon" type="image/png" sizes="64x64" href="/favicon.png" />
|
|
<link rel="apple-touch-icon" sizes="360x360" href="/apple-touch-icon.png" />
|
|
<script dangerouslySetInnerHTML={{ __html: serviceWorkerBootstrap }} />
|
|
<ScrollViewStyleReset />
|
|
</head>
|
|
<body>{children}</body>
|
|
</html>
|
|
);
|
|
}
|