Skip to content

Commit

Permalink
cleanup types
Browse files Browse the repository at this point in the history
  • Loading branch information
adase11 committed Oct 6, 2024
1 parent be6d708 commit 8d1ca91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/Contact/EmailLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ const messages = [
'thanks',
];

const useInterval = (callback, delay) => {
const savedCallback: React.MutableRefObject<any> = useRef<any>();
if (!savedCallback) {
throw new Error();
}
const useInterval = (callback: () => void, delay: number | null) => {
const savedCallback: React.MutableRefObject<() => void> = useRef<() => void>(
() => {}
);

useEffect(() => {
savedCallback.current = callback;
Expand Down

0 comments on commit 8d1ca91

Please sign in to comment.