Skip to content

Commit a6aa4eb

Browse files
committed
fix: enter closes warning
1 parent 79b58da commit a6aa4eb

File tree

1 file changed

+6
-17
lines changed
  • src/routes/(console)/project-[region]-[project]/databases

1 file changed

+6
-17
lines changed

src/routes/(console)/project-[region]-[project]/databases/create.svelte

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
let name = '';
2525
let id: string = null;
2626
let showCustomId = false;
27-
let showPlanUpgradeAlert = true;
2827
2928
const trackEvents = (policies) => {
3029
policies.forEach((policy) => {
@@ -103,10 +102,6 @@
103102
trackError(error, Submit.DatabaseCreate);
104103
}
105104
};
106-
107-
$: if (!showCreate) {
108-
showPlanUpgradeAlert = true;
109-
}
110105
</script>
111106

112107
<Modal title="Create database" onSubmit={create} bind:show={showCreate}>
@@ -132,18 +127,12 @@
132127

133128
{#if isCloud}
134129
{#if $organization?.billingPlan === BillingPlan.FREE}
135-
{#if showPlanUpgradeAlert}
136-
<Alert.Inline
137-
dismissible
138-
title="This database won't be backed up"
139-
status="warning"
140-
on:dismiss={() => (showPlanUpgradeAlert = false)}>
141-
Upgrade your plan to ensure your data stays safe and backed up.
142-
<svelte:fragment slot="actions">
143-
<Button compact href={$upgradeURL}>Upgrade plan</Button>
144-
</svelte:fragment>
145-
</Alert.Inline>
146-
{/if}
130+
<Alert.Inline title="This database won't be backed up" status="warning">
131+
Upgrade your plan to ensure your data stays safe and backed up.
132+
<svelte:fragment slot="actions">
133+
<Button compact href={$upgradeURL}>Upgrade plan</Button>
134+
</svelte:fragment>
135+
</Alert.Inline>
147136
{:else}
148137
<CreatePolicy
149138
bind:totalPolicies

0 commit comments

Comments
 (0)