Skip to content

Commit

Permalink
renaming board to my-board
Browse files Browse the repository at this point in the history
  • Loading branch information
dejanvasic85 committed Oct 28, 2023
1 parent 21bcaa3 commit 55aacf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/routes/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
{#if isLoggedIn}
<a
class="rounded-lg px-3 py-2 font-medium hover:bg-slate-100 hover:text-slate-900"
href="/board"
aria-current={$page.url.pathname === '/board' ? 'page' : undefined}>My Board</a
href="/my-board"
aria-current={$page.url.pathname === '/my-board' ? 'page' : undefined}>My Board</a
>
<button
class="rounded-lg px-3 py-2 font-medium hover:bg-slate-100 hover:text-slate-900"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
});
function handleSelect({ detail: id }: CustomEvent<string>) {
goto(`/board?id=${id}`);
goto(`/my-board?id=${id}`);
}
async function handleCreate() {
Expand All @@ -46,7 +46,7 @@
localNotes = [...localNotes, { ...newNote, order: localNotes.length }];
localNoteOrder = [...localNoteOrder, id];
goto(`/board?id=${id}`);
goto(`/my-board?id=${id}`);
const resp = await tryFetch<Note>(
'/api/notes',
Expand All @@ -56,14 +56,14 @@
if (resp.type === MaybeType.Error) {
localNotes = [...localNotes.filter((n) => n.id !== id)];
goto('/board');
goto('/my-board');
// todo: show an error
}
}
function handleClose() {
goto('/board');
goto('/my-board');
}
async function handleUpdate({ detail: { note } }: CustomEvent<{ note: NoteOrdered }>) {
Expand Down Expand Up @@ -104,7 +104,7 @@
localNoteOrder = [...localNoteOrder, note.id!];
// todo: show an error
} else {
goto('/board');
goto('/my-board');
}
}
Expand All @@ -116,7 +116,7 @@
localNotes = [...getOrderedNotes(noteOrder, localNotes)];
const result = await tryFetch<Board>(
`/api/board/${boardId}`,
`/api/my-board/${boardId}`,
{ method: 'PATCH', body: JSON.stringify({ noteOrder }) },
{ getBearerToken: getToken }
);
Expand Down

0 comments on commit 55aacf2

Please sign in to comment.