Skip to content

Commit df282a7

Browse files
committed
use polan value for projects
1 parent 3aee60c commit df282a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/components/billing/alerts/selectProjectCloud.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import { billingProjectsLimitDate } from '$lib/stores/billing';
1111
import { page } from '$app/state';
1212
import { toLocaleDateTime } from '$lib/helpers/date';
13+
import { currentPlan } from '$lib/stores/organization';
1314
1415
let {
1516
showSelectProject = $bindable(false),
@@ -92,12 +93,12 @@
9293
</Table.Row.Base>
9394
{/each}
9495
</Table.Root>
95-
{#if selectedProjects.length > 2}
96+
{#if selectedProjects.length > $currentPlan?.projects}
9697
<div class="u-text-warning u-mb-4">
97-
You can only select two projects. Please deselect others to continue.
98+
You can only select {$currentPlan?.projects} projects. Please deselect others to continue.
9899
</div>
99100
{/if}
100-
{#if selectedProjects.length === 2}
101+
{#if selectedProjects.length === $currentPlan?.projects}
101102
<Alert.Inline
102103
status="warning"
103104
title={`${projects.length - selectedProjects.length} projects will be archived on ${billingProjectsLimitDate}`}>
@@ -110,6 +111,6 @@
110111
<svelte:fragment slot="footer">
111112
<Button.Button size="s" variant="secondary" on:click={() => (showSelectProject = false)}
112113
>Cancel</Button.Button>
113-
<Button.Button size="s" disabled={selectedProjects.length !== 2}>Save</Button.Button>
114+
<Button.Button size="s" disabled={selectedProjects.length !== $currentPlan?.projects}>Save</Button.Button>
114115
</svelte:fragment>
115116
</Modal>

0 commit comments

Comments
 (0)