We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a59fe8 commit d66454cCopy full SHA for d66454c
1 file changed
hooks/use-idle-timeout.ts
@@ -6,14 +6,13 @@ const IDLE_TIMEOUT = 15 * 60 * 1000; // 15 minutes in milliseconds
6
7
export function useIdleTimeout() {
8
const { disconnect } = useDisconnect();
9
- const timeoutRef = useRef<NodeJS.Timeout | null>(null);
+ const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
10
11
const resetTimer = useCallback(() => {
12
if (timeoutRef.current) {
13
clearTimeout(timeoutRef.current);
14
}
15
timeoutRef.current = setTimeout(() => {
16
- console.log('User idle for too long, disconnecting wallet.');
17
disconnect();
18
}, IDLE_TIMEOUT);
19
}, [disconnect]);
0 commit comments