Skip to content

Commit 6ae329f

Browse files
committed
Improve error message with support link
1 parent 0d94f93 commit 6ae329f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/routes/(console)/project-[region]-[project]/+error.svelte

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<script lang="ts">
22
import { page } from '$app/state';
33
import { Container } from '$lib/layout';
4-
import { Card, Typography } from '@appwrite.io/pink-svelte';
4+
import { Card, Link, Typography } from '@appwrite.io/pink-svelte';
5+
import SupportWizard from '$routes/(console)/supportWizard.svelte';
56
import { capitalize } from '$lib/helpers/string';
7+
import { currentPlan } from '$lib/stores/organization';
8+
import { wizard } from '$lib/stores/wizard';
69
function getResource(id: string) {
710
id = id.replace('/(console)/project-[region]-[project]/', '');
811
let parts = id.split('/');
@@ -19,7 +22,16 @@
1922
<Typography.Title size="s">Your {capitalize(resource)} is paused</Typography.Title>
2023
<p class="text-red-500">
2124
We've detected unusual activity and temporarily paused your {resource}. If you
22-
believe this is a mistake or need urgent access, please contact [email protected].
25+
believe this is a mistake or need urgent access, please contact
26+
{#if $currentPlan?.premiumSupport}
27+
<Link.Button
28+
on:click={() => {
29+
wizard.start(SupportWizard);
30+
}}>support</Link.Button
31+
>.
32+
{:else}
33+
34+
{/if}
2335
</p>
2436
</Card.Base>
2537
{:else}

0 commit comments

Comments
 (0)