import Link from "next/link"; import { AllegatoIframe } from "~/components/allegato-iframe"; import { LoadingPage } from "~/components/loading"; import { useTranslation } from "~/providers/I18nProvider"; import { api } from "~/utils/api"; export const FileSection = ({ storageId }: { storageId: string }) => { const { data: fileInfos, isLoading } = api.storage.getFileInfos.useQuery({ storageId, }); const { t } = useTranslation(); if (isLoading) return ; if (!fileInfos) return

{t.file_section.error}

; return ( <> {t.file_section.download} ); };