feat: downloaditem placeholder

This commit is contained in:
Adrian Castro
2024-03-05 19:53:24 +01:00
parent 0bf34e4ea7
commit 0dbfd4c2be
4 changed files with 94 additions and 2 deletions

View File

@@ -1,10 +1,34 @@
import { ScrollView } from "react-native-gesture-handler";
import type { DownloadItemProps } from "~/components/DownloadItem";
import { DownloadItem } from "~/components/DownloadItem";
import ScreenLayout from "~/components/layout/ScreenLayout";
import { Text } from "~/components/ui/Text";
export default function DownloadsScreen() {
const downloads: DownloadItemProps[] = [
{
filename: "episode.mp4",
progress: 0.3,
speed: 1.2,
fileSize: 500 * 1024 * 1024,
downloaded: 150 * 1024 * 1024,
},
{
filename: "episode.m3u8",
progress: 0.7,
speed: 0.8,
fileSize: 200 * 1024 * 1024,
downloaded: 140 * 1024 * 1024,
},
];
return (
<ScreenLayout title="Downloads">
<Text>Downloads tab</Text>
<ScrollView>
{downloads.map((item, index) => (
<DownloadItem key={index} {...item} />
))}
</ScrollView>
</ScreenLayout>
);
}