Skip to content

Commit f4efd41

Browse files
committed
feat: add missed routes
1 parent 457a73c commit f4efd41

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

src/app/+html.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { ScrollViewStyleReset } from 'expo-router/html';
2+
3+
// This file is web-only and used to configure the root HTML for every
4+
// web page during static rendering.
5+
// The contents of this function only run in Node.js environments and
6+
// do not have access to the DOM or browser APIs.
7+
export default function Root({ children }: { children: React.ReactNode }) {
8+
return (
9+
<html lang="en">
10+
<head>
11+
<meta charSet="utf-8" />
12+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
13+
14+
{/*
15+
This viewport disables scaling which makes the mobile website act more like a native app.
16+
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
18+
*/}
19+
<meta
20+
name="viewport"
21+
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
22+
/>
23+
{/*
24+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
25+
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
26+
*/}
27+
<ScrollViewStyleReset />
28+
29+
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
30+
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
31+
{/* Add any additional <head> elements that you want globally available on web... */}
32+
</head>
33+
<body>{children}</body>
34+
</html>
35+
);
36+
}
37+
38+
const responsiveBackground = `
39+
body {
40+
background-color: #fff;
41+
}
42+
@media (prefers-color-scheme: dark) {
43+
body {
44+
background-color: #000;
45+
}
46+
}`;

src/app/[...messing].tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Link, Stack } from 'expo-router';
2+
3+
import { Text, View } from '@/ui';
4+
5+
export default function NotFoundScreen() {
6+
return (
7+
<>
8+
<Stack.Screen options={{ title: 'Oops!' }} />
9+
<View className="flex-1 items-center justify-center p-4">
10+
<Text className="mb-4 text-2xl font-bold">
11+
This screen doesn't exist.
12+
</Text>
13+
14+
<Link href="/" className="mt-4">
15+
<Text className="text-blue-500 underline">Go to home screen!</Text>
16+
</Link>
17+
</View>
18+
</>
19+
);
20+
}

0 commit comments

Comments
 (0)