Files
native-app/apps/expo/src/app/(tabs)/index.tsx
2024-03-27 12:31:16 +01:00

24 lines
701 B
TypeScript

import React from "react";
import { View } from "tamagui";
import { ItemListSection } from "~/components/item/ItemListSection";
import ScreenLayout from "~/components/layout/ScreenLayout";
import { useBookmarkStore, useWatchHistoryStore } from "~/stores/settings";
export default function HomeScreen() {
const { bookmarks } = useBookmarkStore();
const { watchHistory } = useWatchHistoryStore();
return (
<View style={{ flex: 1 }} flex={1}>
<ScreenLayout>
<ItemListSection title="Bookmarks" items={bookmarks} />
<ItemListSection
title="Continue Watching"
items={watchHistory.map((x) => x.item)}
/>
</ScreenLayout>
</View>
);
}