From 8cc55773f716abcdf8006a36d2946ada36ff4ca5 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 2 Dec 2024 08:32:59 +0545 Subject: [PATCH 1/3] Feat: use premium support from plan attribute --- src/lib/components/support.svelte | 8 +++----- src/lib/sdk/billing.ts | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index 66d922d41..95a008011 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -13,9 +13,7 @@ export let show = false; - $: isPaid = - $organization?.billingPlan === BillingPlan.PRO || - $organization?.billingPlan === BillingPlan.SCALE; + $: hasPremiumSupport = $organization?.billingPlan.premiumSupport ?? false; $: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeTimezoneName()}`; @@ -24,13 +22,13 @@

Premium support

- {#if isPaid} + {#if hasPremiumSupport}

Get personalized support from the Appwrite team from {supportTimings}

{/if}
- {#if $organization?.billingPlan === BillingPlan.FREE} + {#if !hasPremiumSupport}