add ai and todo example templates for native frontends (#293)

This commit is contained in:
Aman Varshney
2025-06-02 16:30:53 +05:30
committed by GitHub
parent 9dbeea8983
commit 7851d0636d
42 changed files with 1606 additions and 536 deletions

View File

@@ -1,34 +1,65 @@
import { Link, Stack } from "expo-router";
import { Text } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { Container } from "@/components/container";
import { Link, Stack } from "expo-router";
import { Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
export default function NotFoundScreen() {
return (
<>
<Stack.Screen options={{ title: "Oops!" }} />
<Container>
<Text style={styles.title}>This screen doesn't exist.</Text>
<Link href="/" style={styles.link}>
<Text style={styles.linkText}>Go to home screen!</Text>
</Link>
<View style={styles.container}>
<View style={styles.content}>
<Text style={styles.emoji}>🤔</Text>
<Text style={styles.title}>Page Not Found</Text>
<Text style={styles.description}>
Sorry, the page you're looking for doesn't exist.
</Text>
<Link href="/" style={styles.button}>
<Text style={styles.buttonText}>Go to Home</Text>
</Link>
</View>
</View>
</Container>
</>
);
}
const styles = StyleSheet.create((theme) => ({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
padding: theme.spacing.lg,
},
content: {
alignItems: "center",
},
emoji: {
fontSize: 64,
marginBottom: theme.spacing.md,
},
title: {
fontSize: 20,
fontSize: theme.fontSize["2xl"],
fontWeight: "bold",
color: theme.colors.typography,
color: theme.colors.foreground,
marginBottom: theme.spacing.sm,
textAlign: "center",
},
link: {
marginTop: 16,
paddingVertical: 16,
description: {
color: theme.colors.mutedForeground,
textAlign: "center",
marginBottom: theme.spacing.xl,
maxWidth: 280,
},
linkText: {
fontSize: 14,
button: {
backgroundColor: `${theme.colors.primary}1A`, // 10% opacity
paddingHorizontal: theme.spacing.lg,
paddingVertical: theme.spacing.sm + 4,
borderRadius: theme.borderRadius.lg,
},
buttonText: {
color: theme.colors.primary,
fontWeight: "500",
},
}));