From 592c1228f1cf4c375686d9ac7c3564aebf94b8ca Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 4 Jan 2025 07:01:31 -0800 Subject: [PATCH] Fix tauri event listener hook --- src-web/components/Sidebar.tsx | 4 +-- src-web/components/core/Dialog.tsx | 4 +-- src-web/hooks/useCommands.ts | 13 --------- src-web/hooks/useCreateCookieJar.ts | 10 ------- src-web/hooks/useCreateEnvironment.ts | 8 ------ src-web/hooks/useCreateGrpcRequest.ts | 7 ----- src-web/hooks/useCreateHttpRequest.ts | 7 ----- src-web/hooks/useDeleteActiveWorkspace.tsx | 8 ------ src-web/hooks/useDeleteAnyGrpcRequest.tsx | 12 +------- src-web/hooks/useDeleteAnyHttpRequest.tsx | 12 +------- src-web/hooks/useListenToTauriEvent.ts | 33 +++++++--------------- src-web/main.tsx | 17 +++++++++-- 12 files changed, 30 insertions(+), 105 deletions(-) diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index c39f23b5..af049004 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -39,7 +39,7 @@ export type SidebarModel = Folder | GrpcRequest | HttpRequest; export function Sidebar({ className }: Props) { const [hidden, setHidden] = useSidebarHidden(); - const sidebarRef = useRef(null); + const sidebarRef = useRef(null); const activeWorkspace = useActiveWorkspace(); const httpResponses = useHttpResponses(); const grpcConnections = useGrpcConnections(); @@ -326,7 +326,7 @@ export function Sidebar({ className }: Props) { return (