import { CloudUploadIcon, XIcon } from '@heroicons/react/solid'; import { useSignal } from '@preact/signals-react'; import { useContext, useEffect } from 'react'; import { Button } from '@/components/elements/button/index'; import { Dialog, DialogWrapperContext } from '@/components/elements/dialog'; import Tooltip from '@/components/elements/tooltip/Tooltip'; import Code from '@/components/elements/Code'; import asDialog from '@/hoc/asDialog'; import { ServerContext } from '@/state/server'; const svgProps = { cx: 16, cy: 16, r: 14, strokeWidth: 3, fill: 'none', stroke: 'currentColor', }; const Spinner = ({ progress, className }: { progress: number; className?: string }) => ( ); const FileUploadList = () => { const { close } = useContext(DialogWrapperContext); const removeFileUpload = ServerContext.useStoreActions(actions => actions.files.removeFileUpload); const clearFileUploads = ServerContext.useStoreActions(actions => actions.files.clearFileUploads); const uploads = ServerContext.useStoreState(state => Object.entries(state.files.uploads).sort(([a], [b]) => a.localeCompare(b)), ); return (
{name}