aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/components/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/components/hooks')
-rw-r--r--FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts (renamed from FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx)3
-rw-r--r--FrontEnd/src/components/hooks/useWindowLeave.ts2
2 files changed, 3 insertions, 2 deletions
diff --git a/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx b/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts
index 78e21151..01c5a1db 100644
--- a/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx
+++ b/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts
@@ -19,5 +19,6 @@ export default function useAutoUnsubscribePromise<T>(
subscribe = false;
};
}
- }, dependencies);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [promiseGenerator, resultHandler, ...(dependencies ?? [])]);
}
diff --git a/FrontEnd/src/components/hooks/useWindowLeave.ts b/FrontEnd/src/components/hooks/useWindowLeave.ts
index 08777e30..ecd999d4 100644
--- a/FrontEnd/src/components/hooks/useWindowLeave.ts
+++ b/FrontEnd/src/components/hooks/useWindowLeave.ts
@@ -18,5 +18,5 @@ export default function useWindowLeave(
window.onbeforeunload = null;
};
}
- }, [allow, message]);
+ }, [c, allow, message]);
}