traintrape-moi/client/app/+html.tsx

36 lines
944 B
TypeScript
Raw Permalink Normal View History

2024-12-09 22:24:53 +00:00
import Head from 'expo-router/head'
import { ScrollViewStyleReset } from 'expo-router/html'
import React from 'react'
export default function Root({ children }: { children: React.ReactNode }) {
return (
<html lang="fr">
<head>
<Head>
<title>Traintrape-moi</title>
</Head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>Traintrape-moi</title>
<ScrollViewStyleReset />
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
</head>
<body>{children}</body>
</html>
)
}
const responsiveBackground = `
body {
background-color: #fff;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
}
}`