diff --git a/src/components/FluxNote.vue b/src/components/FluxNote.vue index be8a53c..504cf4f 100644 --- a/src/components/FluxNote.vue +++ b/src/components/FluxNote.vue @@ -42,7 +42,6 @@ const props = withDefaults( }, ) -const route = useRoute() const user = computed(() => props.user) const repo = computed(() => props.repo) diff --git a/src/hooks/useNoteView.hook.ts b/src/hooks/useNoteView.hook.ts index 13f0409..755c023 100644 --- a/src/hooks/useNoteView.hook.ts +++ b/src/hooks/useNoteView.hook.ts @@ -7,6 +7,7 @@ import { useRouteQueryStackedNotes } from "@/hooks/useRouteQueryStackedNotes.hoo import { resolvePath } from "@/modules/repo/services/resolvePath" import { useUserRepoStore } from "@/modules/repo/store/userRepo.store" import { pathToNotePathTitle } from "@/utils/noteTitle" +import { errorMessage } from "@/utils/notif" export const useNoteView = (containerClass: string) => { const store = useUserRepoStore() @@ -32,10 +33,11 @@ export const useNoteView = (containerClass: string) => { (file) => file.sha === currentNoteSHA, ) - const finalPath = resolvePath(currentFile?.path ?? "", path) + const absolutePath = resolvePath(currentFile?.path ?? "", path) - const file = store.files.find((file) => file.path === finalPath) + const file = store.files.find((file) => file.path === absolutePath) if (!file?.sha) { + errorMessage(`Note ${absolutePath} not found.`) return }