mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
use derived store instead
This commit is contained in:
1 parent
f4b9f32c58
commit
eceec5b3e0
2 files changed
+1
-3
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user