diff --git a/src/routes/notes/edit/[noteid]/+page.js b/src/routes/notes/edit/[noteid]/+page.js index fd2360c86..fa7c53ab5 100644 --- a/src/routes/notes/edit/[noteid]/+page.js +++ b/src/routes/notes/edit/[noteid]/+page.js @@ -14,8 +14,6 @@ export async function load({ params }) { const allNotes = await getNotes(); const note = allNotes.find((item) => item.date === date); - - console.log('note %o allNotes %o noteid %o date %o' , note, allNotes, noteid, date); if (!note) { return { @@ -23,6 +21,6 @@ export async function load({ params }) { error: new Error('Note not found'), }; } - + return { note }; } \ No newline at end of file diff --git a/src/routes/notes/edit/[noteid]/+page.svelte b/src/routes/notes/edit/[noteid]/+page.svelte index 2a835f899..c0b5f7fb8 100644 --- a/src/routes/notes/edit/[noteid]/+page.svelte +++ b/src/routes/notes/edit/[noteid]/+page.svelte @@ -2,8 +2,7 @@ import Navbar from '$lib/components/Navbar.svelte'; import { t } from '$lib/data/stores'; import { DeleteIcon, CheckIcon } from '$lib/icons'; - import { selectedVerses } from '$lib/data/stores'; - import { editNote,addNote,removeNote } from '$lib/data/notes'; + import { editNote,removeNote } from '$lib/data/notes'; export let data; let note = data.note; @@ -24,16 +23,6 @@ note: note, newText:text }); - } else { - await addNote({ - docSet: $selectedVerses[0].docSet, - collection: $selectedVerses[0].collection, - book: $selectedVerses[0].book, - chapter: $selectedVerses[0].chapter, - verse: $selectedVerses[0].verse, - text, - reference: $selectedVerses[0].reference - }); } goBack(); } @@ -44,28 +33,23 @@ } - -
-
+
-