Files
discord-decomp/modules/parent_tools/hooks/useRefreshLinkCodeOnExpiry.tsx
T
2026-11-01 12:12:55 +02:00

18 lines
532 B
TypeScript

// Metro module 13908 (f13909).
import { useEffect } from "react";
import useStableCallback from "../../../hooks/useStableCallback";
export default function useRefreshLinkCodeOnExpiry(a0, a1) {
const stableCallback = useStableCallback(a1);
let c20779_1 = stableCallback;
useEffect(() => {
if (a0 != null) {
const r8 = a0 - Date.now();
if (!(r8 <= 0)) {
let c27589_0 = setTimeout(c20779_1, r8);
return () => clearTimeout(c27589_0);
}
c20779_1();
}
}, [a0, stableCallback]);
};