Skip to content

Commit

Permalink
Remove async from functions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire committed Aug 15, 2024
1 parent 7e86244 commit 8ad0750
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/lib/components/NoteDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
$: heading = note?.reference ?? '';
export async function showModal() {
export function showModal() {
if (note !== undefined) {
text = note.text;
modal.showModal();
} else {
console.log('No note available!')
console.log('No note available!');
}
}
Expand All @@ -29,7 +29,7 @@
selectedVerses.reset();
}
async function onEditNote(){
function onEditNote() {
if (note !== undefined) goto(`${base}/notes/edit/${note.date}`);
}
</script>
Expand All @@ -38,18 +38,14 @@
<svelte:fragment slot="content">
<div id="container" class="flex flex-col justify-evenly">
<div class="w-full flex justify-between items-center">
<div
class="annotation-item-title w-full pb-3 font-bold"
>
<div class="annotation-item-title w-full pb-3 font-bold">
{heading}
</div>
<button class="dy-btn dy-btn-ghost dy-btn-circle"
on:click={onEditNote}
>
<EditIcon />
</button>
<button class="dy-btn dy-btn-ghost dy-btn-circle" on:click={onEditNote}>
<EditIcon />
</button>
</div>

<div style:word-wrap="break-word" class="mt-2">
{#if text !== undefined}
{#each text.split(/\r?\n/) as line}
Expand All @@ -66,5 +62,3 @@
</div>
</svelte:fragment>
</Modal>


0 comments on commit 8ad0750

Please sign in to comment.