From 4b1996f7efca8e3541c05443c80e8897491e2645 Mon Sep 17 00:00:00 2001 From: sripwoud Date: Thu, 27 Jun 2024 10:27:42 +0200 Subject: [PATCH] refactor: desctructure event.target.value More in line with react conventions --- apps/web/src/containers/FileSelect.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/containers/FileSelect.tsx b/apps/web/src/containers/FileSelect.tsx index 1d62f74..9ce563b 100644 --- a/apps/web/src/containers/FileSelect.tsx +++ b/apps/web/src/containers/FileSelect.tsx @@ -6,8 +6,8 @@ export function FileSelect() { const { selectedFile, setSelectedFile, tickedDownloadAll, toggleTickedDownloadAll } = useStore() const { data: files, isLoading, isFetched, isSuccess, isError, error } = useFiles() const onSelectChange = (e: ChangeEvent) => { - const file = e.target as HTMLSelectElement - setSelectedFile(file.value) + const { value } = e.target as HTMLSelectElement + setSelectedFile(value) } if (isLoading) return
Loading...