From fc586c6d49c033da59baadc9571c7d878c8e1de5 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 19 Jul 2023 17:51:43 +0200 Subject: [PATCH] fix: notification is only shown once --- src/routes/console/organization-[organization]/+layout.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/console/organization-[organization]/+layout.svelte b/src/routes/console/organization-[organization]/+layout.svelte index a80a481e6..44af73bde 100644 --- a/src/routes/console/organization-[organization]/+layout.svelte +++ b/src/routes/console/organization-[organization]/+layout.svelte @@ -14,6 +14,7 @@ }); function checkForTrialEnding() { + if (localStorage.getItem('trialEndingNotification') === 'true') return; if ($organization?.billingTrialDays === 5) { const expirationDate = new Date( new Date().getTime() + 5 * 24 * 60 * 60 * 1000 @@ -26,6 +27,7 @@ expirationDate )}` }); + localStorage.setItem('trialEndingNotification', 'true'); } }