diff --git a/ts/routes/congrats/CongratsPage.svelte b/ts/routes/congrats/CongratsPage.svelte index bd05e10d9..cc4eee861 100644 --- a/ts/routes/congrats/CongratsPage.svelte +++ b/ts/routes/congrats/CongratsPage.svelte @@ -4,6 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> diff --git a/ts/routes/congrats/index.ts b/ts/routes/congrats/index.ts index 2e2b28d75..52fc74a3d 100644 --- a/ts/routes/congrats/index.ts +++ b/ts/routes/congrats/index.ts @@ -20,21 +20,9 @@ export async function setupCongrats(): Promise { const page = new CongratsPage({ // use #congrats if it exists, otherwise entire body target: customMountPoint ?? document.body, - props: { info }, + props: { info, refreshPeriodically: !customMountPoint }, }); - // refresh automatically if a custom area not provided - if (!customMountPoint) { - setInterval(async () => { - try { - const info = await congratsInfo({}); - page.$set({ info }); - } catch { - console.log("congrats fetch failed"); - } - }, 60000); - } - return page; }