Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

add buckle dialog (#499)

Guy Ben-Aharon9831ac5a1012
diff --git a/src/pages/editor-page/editor-page.tsx b/src/pages/editor-page/editor-page.tsx
index eb65e6ca..e210e207 100644
--- a/src/pages/editor-page/editor-page.tsx
+++ b/src/pages/editor-page/editor-page.tsx
@@ -160,9 +160,11 @@ const EditorPageComponent: React.FC = () => {
new Date().getTime() - starUsDialogLastOpen >
1000 * 60 * 60 * 24 * SHOW_STAR_US_AGAIN_AFTER_DAYS
) {
- const lastOpen = new Date().getTime();
- setStarUsDialogLastOpen(lastOpen);
- setTimeout(openStarUsDialog, OPEN_STAR_US_AFTER_SECONDS * 1000);
+ setTimeout(() => {
+ const lastOpen = new Date().getTime();
+ setStarUsDialogLastOpen(lastOpen);
+ openStarUsDialog();
+ }, OPEN_STAR_US_AFTER_SECONDS * 1000);
}
}, [
currentDiagram?.id,
@@ -187,9 +189,11 @@ const EditorPageComponent: React.FC = () => {
? SHOW_BUCKLE_AGAIN_OPENED_AFTER_DAYS
: SHOW_BUCKLE_AGAIN_AFTER_DAYS)
) {
- const lastOpen = new Date().getTime();
- setBuckleDialogLastOpen(lastOpen);
- setTimeout(openBuckleDialog, OPEN_BUCKLE_AFTER_SECONDS * 1000);
+ setTimeout(() => {
+ const lastOpen = new Date().getTime();
+ setBuckleDialogLastOpen(lastOpen);
+ openBuckleDialog();
+ }, OPEN_BUCKLE_AFTER_SECONDS * 1000);
}
}, [
currentDiagram?.id,