mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: currentPlan checks in buckets.
This commit is contained in:
1 parent
ddf52b8899
commit
bac6387885
2 files changed
+5
-2
No files matched your search
@@ -1,9 +1,12 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { isCloud } from '$lib/system';
|
||||
|
||||
export const load: PageLoad = async ({ parent }) => {
|
||||
const { organization } = await parent();
|
||||
const currentPlan = await sdk.forConsole.billing.getOrganizationPlan(organization.$id);
|
||||
const currentPlan = isCloud
|
||||
? await sdk.forConsole.billing.getOrganizationPlan(organization.$id)
|
||||
: null;
|
||||
return {
|
||||
currentPlan
|
||||
};
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
import type { Plan } from '$lib/sdk/billing';
|
||||
export let currentPlan: Plan;
|
||||
|
||||
const service = currentPlan['fileSize'];
|
||||
const service = currentPlan?.['fileSize'];
|
||||
const { value, unit, baseValue, units } = createByteUnitPair($bucket.maximumFileSize, 1000);
|
||||
const options = units.map((v) => ({ label: v.name, value: v.name }));
|
||||
$: selectedUnit = $unit;
|
||||
|
||||
Reference in new issue
Block a user