diff --git a/apps/expo/src/app/(downloads)/[tmdbId].tsx b/apps/expo/src/app/(downloads)/[tmdbId].tsx index cb79676..acb4251 100644 --- a/apps/expo/src/app/(downloads)/[tmdbId].tsx +++ b/apps/expo/src/app/(downloads)/[tmdbId].tsx @@ -1,4 +1,4 @@ -import { useMemo } from "react"; +import { useEffect, useMemo } from "react"; import { Stack, useLocalSearchParams, useRouter } from "expo-router"; import { YStack } from "tamagui"; @@ -21,6 +21,10 @@ export default function Page() { return allDownloads.find((download) => download.media.tmdbId === tmdbId); }, [allDownloads, tmdbId]); + useEffect(() => { + if (!download) router.back(); + }, [download, router]); + const handlePress = (localPath?: string) => { if (!localPath) return; resetVideo();