From 12762271df7ad56c28dd440c4dd89ea75e668c0f Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 26 Sep 2024 12:40:37 +0530 Subject: [PATCH] fix: rename methods causing failures. --- src/lib/components/backupDatabaseAlert.svelte | 4 ++-- src/lib/stores/database.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/components/backupDatabaseAlert.svelte b/src/lib/components/backupDatabaseAlert.svelte index edb098ea0..54cca2906 100644 --- a/src/lib/components/backupDatabaseAlert.svelte +++ b/src/lib/components/backupDatabaseAlert.svelte @@ -6,7 +6,7 @@ import { HeaderAlert } from '$lib/layout'; import { isCloud } from '$lib/system'; import { upgradeURL } from '$lib/stores/billing'; - import { hideNotificationBanner } from '$lib/helpers/notifications'; + import { hideNotification } from '$lib/helpers/notifications'; import { backupsBannerId, showPolicyAlert } from '$lib/stores/database'; const isFreePlan = $organization?.billingPlan === BillingPlan.FREE; @@ -19,7 +19,7 @@ function handleClose() { showPolicyAlert.set(false); - hideNotificationBanner(backupsBannerId); + hideNotification(backupsBannerId); } diff --git a/src/lib/stores/database.ts b/src/lib/stores/database.ts index 5e8e01bfb..2cfb98f4a 100644 --- a/src/lib/stores/database.ts +++ b/src/lib/stores/database.ts @@ -4,18 +4,17 @@ import { type Models, Query } from '@appwrite.io/console'; import { sdk } from '$lib/stores/sdk'; import { headerAlert } from '$lib/stores/headerAlert'; import BackupDatabase from '$lib/components/backupDatabaseAlert.svelte'; -import { shouldShowNotificationBanner } from '$lib/helpers/notifications'; +import { shouldShowNotification } from '$lib/helpers/notifications'; export const database = derived(page, ($page) => $page.data?.database as Models.Database); export const backupsBannerId = 'databasesBackup'; export const showPolicyAlert = writable(false); -export const userHidBackupsPromotion = writable(false); export async function checkForDatabaseBackupPolicies(database: Models.Database) { // fast path: return if user dismissed the banner - if (!shouldShowNotificationBanner(backupsBannerId)) return; + if (!shouldShowNotification(backupsBannerId)) return; let total = 0;