Skip to content

Commit 34c5681

Browse files
added submission loader to the delete button
1 parent ccf429e commit 34c5681

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/routes/(console)/project-[region]-[project]/settings/deleteProject.svelte

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<script lang="ts">
22
import { goto, invalidate } from '$app/navigation';
33
import { base } from '$app/paths';
4-
import { Layout } from '@appwrite.io/pink-svelte';
54
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
6-
import { BoxAvatar, CardGrid } from '$lib/components';
5+
import { BoxAvatar, CardGrid, Modal } from '$lib/components';
76
import { Button, InputText } from '$lib/elements/forms';
87
import { toLocaleDateTime } from '$lib/helpers/date';
98
import { addNotification } from '$lib/stores/notifications';
@@ -12,7 +11,6 @@
1211
import { project, projectRegion } from '../store';
1312
import { organization } from '$lib/stores/organization';
1413
import { Dependencies } from '$lib/constants';
15-
import Modal from '$lib/components/modal.svelte';
1614
let error: string;
1715
let showDelete = false;
1816
let name: string = null;
@@ -69,18 +67,17 @@
6967
<b>This action is irreversible.</b>
7068
</svelte:fragment>
7169

72-
<Layout.Stack gap="l">
73-
<InputText
74-
label={`Enter "${$project.name}" to continue`}
75-
placeholder="Enter name"
76-
id="project-name"
77-
autofocus
78-
required
79-
bind:value={name} />
80-
</Layout.Stack>
70+
<InputText
71+
label={`Enter "${$project.name}" to continue`}
72+
placeholder="Enter name"
73+
id="project-name"
74+
autofocus
75+
required
76+
bind:value={name} />
8177

8278
<svelte:fragment slot="footer">
8379
<Button text on:click={() => (showDelete = false)}>Cancel</Button>
84-
<Button danger submit disabled={name !== $project.name}>Delete</Button>
80+
<Button submissionLoader={true} danger submit disabled={name !== $project.name}
81+
>Delete</Button>
8582
</svelte:fragment>
8683
</Modal>

0 commit comments

Comments
 (0)