import { ActivityIndicator, Pressable, Text, View } from "react-native"; import { StatusBar } from "expo-status-bar"; import type { RootStackScreenProps } from "@/navigation/types"; import { particlePath } from "@/lib/particle-path"; import { useLiveParticle } from "@/hooks/use-particle"; import { StreamView } from "./StreamView"; export function StreamViewScreen({ navigation, route, }: RootStackScreenProps<"StreamView">) { const { networkId, streamId } = route.params; const streamPath = particlePath(networkId, [streamId]); const { particle, isLoading, error } = useLiveParticle(streamPath); if (isLoading && !particle) { return ( ); } if (error || !particle || particle.type !== "stream") { return ( ); } return ( navigation.goBack()} /> ); }