mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Change to ternary
This commit is contained in:
@@ -25,6 +25,7 @@ export const load: LayoutLoad = async ({ fetch, depends, parent }) => {
|
||||
let plansInfo = new Map<Tier, Plan>();
|
||||
if (isCloud) {
|
||||
const plansArray = await sdk.forConsole.billing.getPlansInfo();
|
||||
console.log('plansArray', plansArray);
|
||||
plansInfo = plansArray.plans.reduce((map, plan) => {
|
||||
map.set(plan.$id as Tier, plan);
|
||||
return map;
|
||||
|
||||
@@ -190,11 +190,10 @@
|
||||
(team) => team.$id === selectedOrgId
|
||||
) as Organization;
|
||||
|
||||
$: if (selectedOrg?.billingPlan === BillingPlan.SCALE) {
|
||||
billingPlan = BillingPlan.SCALE;
|
||||
} else if (campaign?.plan) {
|
||||
billingPlan = campaign.plan;
|
||||
}
|
||||
$: billingPlan =
|
||||
selectedOrg?.billingPlan === BillingPlan.SCALE
|
||||
? BillingPlan.SCALE
|
||||
: (campaign?.plan ?? BillingPlan.PRO);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user