diff --git a/apps/expo/src/app/(tabs)/index.tsx b/apps/expo/src/app/(tabs)/index.tsx index c6085c5..d694225 100644 --- a/apps/expo/src/app/(tabs)/index.tsx +++ b/apps/expo/src/app/(tabs)/index.tsx @@ -1,10 +1,103 @@ +import { ScrollView, View } from "react-native"; +import { useSharedValue, withTiming } from "react-native-reanimated"; + +import type { ItemData } from "~/components/item/item"; +import Item from "~/components/item/item"; import ScreenLayout from "~/components/layout/ScreenLayout"; import { Text } from "~/components/ui/Text"; export default function HomeScreen() { + const fadeAnim = useSharedValue(1); + + const handleScrollBegin = () => { + fadeAnim.value = withTiming(0, { + duration: 100, + }); + }; + + const handleScrollEnd = () => { + fadeAnim.value = withTiming(1, { + duration: 100, + }); + }; + + const bookmarks: ItemData[] = [ + { + id: "219651", + title: "Welcome to Samdal-ri", + posterUrl: + "https://www.themoviedb.org/t/p/w185/98IvA2i0PsTY8CThoHByCKOEAjz.jpg", + type: "tv", + year: 2023, + }, + { + id: "194797", + title: "Doona!", + posterUrl: + "https://www.themoviedb.org/t/p/w185/bQhiOkU3lCu5pwCqPdNVG5GBLlj.jpg", + type: "tv", + year: 2023, + }, + ]; + + const watching: ItemData[] = [ + { + id: "113268", + title: "The Uncanny Counter", + posterUrl: + "https://www.themoviedb.org/t/p/w185/tKU34QiJUfVipcuhAs5S3TdCpAF.jpg", + type: "tv", + year: 2020, + }, + { + id: "203508", + title: "Earth Arcade", + posterUrl: + "https://www.themoviedb.org/t/p/w185/vBJ0uF0WlFcjr9obZZqE6GSsKoL.jpg", + type: "tv", + year: 2022, + }, + ]; + return ( - - Home tab - + + 0 || watching.length > 0 ? true : false + } + keyboardDismissMode="on-drag" + keyboardShouldPersistTaps="handled" + > + + Home + + } + > + Bookmarks + + {bookmarks?.map((item, index) => ( + + + + ))} + + + + Continue Watching + + + {watching?.map((item, index) => ( + + + + ))} + + + + ); }