From 9067d38dce059718577f7fee214f7a31495e14c4 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 12 Dec 2023 18:38:29 +0100 Subject: [PATCH] Create updating page --- packages/builder/src/api.js | 10 +++++++--- .../src/pages/builder/updating/[appId].svelte | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 packages/builder/src/pages/builder/updating/[appId].svelte diff --git a/packages/builder/src/api.js b/packages/builder/src/api.js index e93dae65f8..2fa48273f0 100644 --- a/packages/builder/src/api.js +++ b/packages/builder/src/api.js @@ -46,8 +46,12 @@ export const API = createAPIClient({ } }, onMigrationDetected: appId => { - window.location = `/builder/updating/${appId}?returnUrl=${encodeURI( - window.location - )}` + const updatingUrl = `/builder/updating/${appId}` + + if (window.location.pathname === updatingUrl) { + return + } + + window.location = `${updatingUrl}?returnUrl=${encodeURI(window.location)}` }, }) diff --git a/packages/builder/src/pages/builder/updating/[appId].svelte b/packages/builder/src/pages/builder/updating/[appId].svelte new file mode 100644 index 0000000000..69a2d58eed --- /dev/null +++ b/packages/builder/src/pages/builder/updating/[appId].svelte @@ -0,0 +1,14 @@ + + +
+ +
+ +