Remove unused download badge, add Executable types to useSocket

This commit is contained in:
2024-12-23 16:50:33 -06:00
parent 1a3f56e0ce
commit 81c509b0b0
2 changed files with 8 additions and 1 deletions

View File

@@ -69,7 +69,6 @@ const Demo = ({ class: className }: DemoProps) => {
{download}
</Badge>
))}
<Badge>download</Badge>
</div>
<div class="mt-4 p-2 bg-zinc-900/90 rounded-md border border-zinc-700">
<p class="my-0">

View File

@@ -7,8 +7,15 @@ interface Download {
download_time: string;
}
interface Executable {
id: string;
name: string;
size: number;
}
interface UseSocketResult {
id: string | null;
executables: Executable[];
downloads: Download[] | null;
deleteDownload: (id: string) => void;
}
@@ -16,6 +23,7 @@ interface UseSocketResult {
function useSocket(): UseSocketResult {
const [id, setId] = useState<string | null>(null);
const [downloads, setDownloads] = useState<Download[] | null>(null);
const [executables, setExecutables] = useState<string | null>(null);
function deleteDownload() {}