Skip to content

Commit

Permalink
clean api on willUnmout
Browse files Browse the repository at this point in the history
  • Loading branch information
panaC committed Sep 11, 2023
1 parent 340ea16 commit 7aefd80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderer/common/hooks/useApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export function useApi<T extends TApiMethodName>(_requestId: string, apiPath: T,
const moduleId = splitPath[0] as TModuleApi;
const methodId = splitPath[1] as TMethodApi;
store.dispatch(apiActions.request.build(requestId, moduleId, methodId, requestData))

Check failure on line 20 in src/renderer/common/hooks/useApi.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Missing semicolon

return () => {
store.dispatch(apiActions.clean.build(requestId));
}

Check failure on line 24 in src/renderer/common/hooks/useApi.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Missing semicolon
}, []); // componentDidMount

const apiResult = useSyncExternalStore(store.subscribe, () => store.getState().api[requestId]);
Expand Down

0 comments on commit 7aefd80

Please sign in to comment.