import React, { useContext, useEffect, useState } from 'react'; import { ServerContext } from '@/state/server'; import { CloudUploadIcon } from '@heroicons/react/solid'; import asDialog from '@/hoc/asDialog'; import { Dialog, DialogWrapperContext } from '@/components/elements/dialog'; import { Button } from '@/components/elements/button/index'; import Tooltip from '@/components/elements/tooltip/Tooltip'; import Code from '@/components/elements/Code'; 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 uploads = ServerContext.useStoreState((state) => state.files.uploads.sort((a, b) => a.name.localeCompare(b.name)) ); return (
{file.name}