From 81c509b0b0a7da59ff5cd7a881d06a01b6598892 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 23 Dec 2024 16:50:33 -0600 Subject: [PATCH] Remove unused download badge, add Executable types to useSocket --- frontend/src/components/Demo.tsx | 1 - frontend/src/components/useSocket.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Demo.tsx b/frontend/src/components/Demo.tsx index 51adc2c..b122fc6 100644 --- a/frontend/src/components/Demo.tsx +++ b/frontend/src/components/Demo.tsx @@ -69,7 +69,6 @@ const Demo = ({ class: className }: DemoProps) => { {download} ))} - download

diff --git a/frontend/src/components/useSocket.ts b/frontend/src/components/useSocket.ts index 897b5cf..b1926aa 100644 --- a/frontend/src/components/useSocket.ts +++ b/frontend/src/components/useSocket.ts @@ -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(null); const [downloads, setDownloads] = useState(null); + const [executables, setExecutables] = useState(null); function deleteDownload() {}