import { useMemo } from "react"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./ui/accordion"; import { Progress } from "./ui/progress"; import { usePinning } from "~/hooks/usePinning"; import { Tabs, TabsTrigger, TabsList, TabsContent } from "./ui/tabs"; import { Button } from "./ui/button"; import { Cross2Icon } from "@radix-ui/react-icons"; import type { PinningStatus } from "~/data/pinning"; export const PinningNetworkBanner = () => { const { progressData: data } = usePinning(); const itemsQueued = useMemo( () => data?.items.filter((item: PinningStatus) => item.status.includes("queued"), ) || [], [data], ); const itemsProcessing = useMemo( () => data?.items.filter((item: PinningStatus) => item.status.includes("processing"), ) || [], [data], ); const completedItems = useMemo( () => data?.items.filter((item: PinningStatus) => item.status.includes("completed"), ) || [], [data], ); return (