Live video on the AT Protocol
at eli/nonfatal-errors 37 lines 1.4 kB view raw
1import { createNativeStackNavigator } from "@react-navigation/native-stack"; 2import { Platform } from "react-native"; 3import PopoutChat from "src/screens/chat-popout"; 4import DanmuOBSScreen from "src/screens/danmu-obs"; 5import EmbedScreen from "src/screens/embed"; 6import InfoWidgetEmbed from "src/screens/info-widget-embed"; 7import MobileStream from "src/screens/mobile-stream"; 8import type { RootStackParamList } from "./navigation-types"; 9 10const Stack = createNativeStackNavigator<RootStackParamList>(); 11 12// The root navigator, containing full-screen items that we want to hide the tab bar on 13// On mobile, we'll want these to contain a back button to redirect to somewhere that 14// has tabs (e.g. Home) 15export const RootNavigator = () => { 16 return ( 17 <Stack.Navigator 18 initialRouteName="Stream" 19 screenOptions={{ 20 headerShown: Platform.OS !== "web", 21 }} 22 > 23 <Stack.Screen name="Stream" component={MobileStream} /> 24 <Stack.Screen name="PopoutChat" component={PopoutChat} /> 25 <Stack.Screen name="Embed" component={EmbedScreen} /> 26 <Stack.Screen name="InfoWidgetEmbed" component={InfoWidgetEmbed} /> 27 <Stack.Screen name="DanmuOBS" component={DanmuOBSScreen} /> 28 </Stack.Navigator> 29 ); 30}; 31 32// TypeScript helpers 33export type RootNavigatorType = typeof Stack; 34 35declare module "@react-navigation/core" { 36 interface RootNavigator extends RootNavigatorType {} 37}