import { Folder } from '@/lib/db/models/folder'; import { Alert, Anchor, Button, CopyButton, Group, Modal, SimpleGrid, Skeleton, Text } from '@mantine/core'; import { IconShare } from '@tabler/icons-react'; import { lazy, Suspense } from 'react'; const DashboardFile = lazy(() => import('@/components/file/DashboardFile')); export default function ViewFilesModal({ folder, opened, onClose, }: { folder: Folder | null; opened: boolean; onClose: () => void; }) { return ( {folder?.allowUploads && ( } variant='outline' mb='sm' styles={{ message: { marginTop: 0 } }} > This folder allows anonymous uploads. Share the link below to allow others to let others upload files to this folder.
{`${window?.location?.origin ?? ''}/folder/${folder.id}/upload`} {({ copied, copy }) => ( )}
)} {folder?.files?.length === 0 ? null : ( {folder?.files?.map((file) => ( } key={file.id}> ))} )} {folder?.id} {folder?.files?.length} files found
); }