use derived store instead

This commit is contained in:
Damodar Lohani committed 2025-03-17 06:11:20 +00:00
1 parent f4b9f32c58
commit eceec5b3e0
2 files changed
+1 -3

No files matched your search

+1 -2
View File
@@ -65,7 +65,7 @@ export const plansInfo = derived(page, ($page) => $page.data.plansInfo as PlansM
export const daysLeftInTrial = writable<number>(0);
export const readOnly = writable<boolean>(false);
export const showBudgetAlert = writable<boolean>(false);
export const showBudgetAlert = derived(page, ($page) => ($page.data.organization?.billingLimits.budgetLimit ?? 0) >= 100);
export function getRoleLabel(role: string) {
return roles.find((r) => r.value === role)?.label ?? role;
@@ -279,7 +279,6 @@ export async function checkForUsageLimit(org: Organization) {
return;
}
showBudgetAlert.set(true);
headerAlert.add({
id: 'budgetLimit',
component: BudgetLimitAlert,
@@ -27,7 +27,6 @@
$organization.budgetAlerts
);
await invalidate(Dependencies.ORGANIZATION);
showBudgetAlert.set(false);
addNotification({
type: 'success',
isHtml: true,