import { t } from "i18next";
import { View, type ViewProps } from "react-native";
import { Text } from "@/components/common/Text";
import { useDownload } from "@/providers/DownloadProvider";
import { JobStatus } from "@/providers/Downloads/types";
import { DownloadCard } from "./DownloadCard";
interface ActiveDownloadsProps extends ViewProps {}
export default function ActiveDownloads({ ...props }: ActiveDownloadsProps) {
const { processes } = useDownload();
if (processes?.length === 0)
return (
{t("home.downloads.active_download")}
{t("home.downloads.no_active_downloads")}
);
return (
{t("home.downloads.active_downloads")}
{processes?.map((p: JobStatus) => (
))}
);
}