mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-23 06:11:58 +00:00
fix: update dependencies in hooks for improved functionality
This commit is contained in:
@@ -96,7 +96,7 @@ export function useLogin() {
|
||||
};
|
||||
|
||||
checkAuth();
|
||||
}, [router, setUser, setIsAdmin, setIsAuthenticated]);
|
||||
}, [router, setUser, setIsAdmin, setIsAuthenticated, t]);
|
||||
|
||||
const toggleVisibility = () => setIsVisible(!isVisible);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ export function useTrustedDevices() {
|
||||
const confirmRemoveAllDevices = useCallback(async () => {
|
||||
try {
|
||||
setIsRemoving(true);
|
||||
const response = await removeAllTrustedDevices();
|
||||
await removeAllTrustedDevices();
|
||||
toast.success(t("twoFactor.trustedDevices.allDevicesRemoved"));
|
||||
await loadDevices();
|
||||
setIsRemoveAllModalOpen(false);
|
||||
|
Reference in New Issue
Block a user