(fix:types) stricter in v19

This commit is contained in:
ManishMadan2882
2025-06-20 23:11:53 +05:30
parent 7077ca5e98
commit 6834961dd1
10 changed files with 20 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
import { useEffect, RefObject, useState } from 'react';
export function useOutsideAlerter<T extends HTMLElement>(
ref: RefObject<T>,
ref: RefObject<T | null>,
handler: () => void,
additionalDeps: unknown[],
handleEscapeKey?: boolean,
@@ -30,7 +30,7 @@ export function useOutsideAlerter<T extends HTMLElement>(
document.removeEventListener('keydown', handleEscape);
}
};
}, [ref, ...additionalDeps]);
}, [ref, handler, handleEscapeKey, ...additionalDeps]);
}
export function useMediaQuery() {