fix: timers type in browser env (#3875)

This commit is contained in:
Camol authored and GitHub committed 2023-08-21 14:14:25 -05:00
1 parent eda5ff4d3f
commit fc9981335b
11 files changed
+19 -19

No files matched your search

+1 -1
View File
@@ -183,7 +183,7 @@ const BookMarkUI = ({ page }: BookMarkProps) => {
if (!shouldShowBookmarkMenu(pastedBlocks)) {
return;
}
setTimeout(() => {
window.setTimeout(() => {
setAnchor(getCurrentNativeRange());
}, 100);
});
@@ -72,10 +72,10 @@ const ImagePreviewModalImpl = (
const [hasPlayedAnimation, setHasPlayedAnimation] = useState<boolean>(false);
useEffect(() => {
let timeoutId: NodeJS.Timeout;
let timeoutId: number;
if (!isOpen) {
timeoutId = setTimeout(() => {
timeoutId = window.setTimeout(() => {
props.onClose();
setIsOpen(true);
}, 300);