();
const [topColor, middleColor, bottomColor] = colors;
const [isHover, setIsHover] = useState(false);
@@ -38,7 +38,7 @@ export const DefaultAvatar = ({ name: propsName }: { name: string }) => {
{
- timer.current = setTimeout(() => {
+ timer.current = window.setTimeout(() => {
setIsHover(true);
}, 300);
}}
diff --git a/packages/component/src/ui/popper/popper.tsx b/packages/component/src/ui/popper/popper.tsx
index 04088b37c0..2d69365ff0 100644
--- a/packages/component/src/ui/popper/popper.tsx
+++ b/packages/component/src/ui/popper/popper.tsx
@@ -69,7 +69,7 @@ export const Popper = ({
}
window.clearTimeout(pointerLeaveTimer.current);
- pointerEnterTimer.current = window.setTimeout(() => {
+ pointerEnterTimer.current = window.window.setTimeout(() => {
setVisible(true);
}, pointerEnterDelay);
};
@@ -81,7 +81,7 @@ export const Popper = ({
return;
}
window.clearTimeout(pointerEnterTimer.current);
- pointerLeaveTimer.current = window.setTimeout(() => {
+ pointerLeaveTimer.current = window.window.setTimeout(() => {
setVisible(false);
}, pointerLeaveDelay);
};
diff --git a/plugins/bookmark/src/app.tsx b/plugins/bookmark/src/app.tsx
index 5bf990fe93..7cf6a57c48 100644
--- a/plugins/bookmark/src/app.tsx
+++ b/plugins/bookmark/src/app.tsx
@@ -183,7 +183,7 @@ const BookMarkUI = ({ page }: BookMarkProps) => {
if (!shouldShowBookmarkMenu(pastedBlocks)) {
return;
}
- setTimeout(() => {
+ window.setTimeout(() => {
setAnchor(getCurrentNativeRange());
}, 100);
});
diff --git a/plugins/image-preview/src/component/index.tsx b/plugins/image-preview/src/component/index.tsx
index 6d89f9359c..3de57c2bb1 100644
--- a/plugins/image-preview/src/component/index.tsx
+++ b/plugins/image-preview/src/component/index.tsx
@@ -72,10 +72,10 @@ const ImagePreviewModalImpl = (
const [hasPlayedAnimation, setHasPlayedAnimation] = useState(false);
useEffect(() => {
- let timeoutId: NodeJS.Timeout;
+ let timeoutId: number;
if (!isOpen) {
- timeoutId = setTimeout(() => {
+ timeoutId = window.setTimeout(() => {
props.onClose();
setIsOpen(true);
}, 300);