From 8f0be6efce27783fecadf8980a153fbf82ff2ab3 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Tue, 2 Jul 2024 17:17:27 +0200 Subject: [PATCH] respect has_subscription property in frontend for displaying the member add popup --- resources/js/utils/billing.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/js/utils/billing.ts b/resources/js/utils/billing.ts index 5f0f82c5..948739e0 100644 --- a/resources/js/utils/billing.ts +++ b/resources/js/utils/billing.ts @@ -9,6 +9,11 @@ export function isBillingActivated() { } export function hasActiveSubscription() { - // TODO: Replace with server side check - return true; + const page = usePage<{ + billing: { + has_subscription: boolean; + }; + }>(); + + return page.props.billing.has_subscription; }