Skip to content

Commit eb759b7

Browse files
removed event handlers which may lead to bugs
1 parent 9169ce1 commit eb759b7

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/lib/components/confirm.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { Button, Form, InputCheckbox } from '$lib/elements/forms';
3-
import { Alert, Dialog, Layout } from '@appwrite.io/pink-svelte';
3+
import { Alert, Dialog, Layout, Modal } from '@appwrite.io/pink-svelte';
44
55
export let open: boolean;
66
export let title: string;

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import { project, projectRegion } from '../store';
1212
import { organization } from '$lib/stores/organization';
1313
import { Dependencies } from '$lib/constants';
14-
import { onDestroy, onMount } from 'svelte';
1514
1615
let error: string;
1716
let showDelete = false;
@@ -41,20 +40,6 @@
4140
}
4241
};
4342
44-
const handleKeydown = (e: KeyboardEvent) => {
45-
if (e.key === 'Enter') {
46-
if (name !== $project.name) e.preventDefault();
47-
else handleDelete();
48-
}
49-
};
50-
51-
onMount(() => {
52-
window.addEventListener('keydown', handleKeydown);
53-
});
54-
55-
onDestroy(() => {
56-
window.removeEventListener('keydown', handleKeydown);
57-
});
5843
</script>
5944

6045
<CardGrid>

0 commit comments

Comments
 (0)