实现详情页

This commit is contained in:
yuchenglong
2026-01-13 09:26:13 +08:00
parent bb6c21496f
commit 9c16586994
13 changed files with 902 additions and 21 deletions

View File

@@ -1,14 +1,18 @@
import { DarkTheme, DefaultTheme, ThemeProvider as NavigationThemeProvider } from '@react-navigation/native';
import { Stack } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
import 'react-native-reanimated';
import {
DarkTheme,
DefaultTheme,
ThemeProvider as NavigationThemeProvider,
} from "@react-navigation/native";
import { Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
import "react-native-reanimated";
import { useColorScheme } from '@/hooks/use-color-scheme';
import { ThemeProvider } from '@/context/ThemeContext';
import '@/i18n'; // Initialize i18n
import { ThemeProvider } from "@/context/ThemeContext";
import { useColorScheme } from "@/hooks/use-color-scheme";
import "@/i18n"; // Initialize i18n
export const unstable_settings = {
anchor: '(tabs)',
anchor: "(tabs)",
};
export default function RootLayout() {
@@ -23,12 +27,25 @@ function RootLayoutNav() {
const colorScheme = useColorScheme();
return (
<NavigationThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<NavigationThemeProvider
value={colorScheme === "dark" ? DarkTheme : DefaultTheme}
>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="modal" options={{ presentation: 'modal', title: 'Modal' }} />
<Stack.Screen
name="modal"
options={{ presentation: "modal", title: "Modal" }}
/>
<Stack.Screen
name="match-detail/[id]"
options={{
animation: "slide_from_right",
headerShown: true,
headerTitle: "",
}}
/>
</Stack>
<StatusBar style={colorScheme === 'dark' ? 'light' : 'dark'} />
<StatusBar style={colorScheme === "dark" ? "light" : "dark"} />
</NavigationThemeProvider>
);
}