refacto to use ref route query
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { computed, Ref, toValue, watch } from 'vue'
|
||||
|
||||
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
|
||||
import { useRouteQueryStackedNotes } from '@/hooks/useRouteQueryStackedNotes.hook'
|
||||
import { useNotes } from '@/modules/note/hooks/useNotes'
|
||||
import { pathToNoteTitle } from '@/utils/noteTitle'
|
||||
|
||||
export const generateTitle = (titles: string[]) => titles.join(' | ')
|
||||
|
||||
export const useTitleNotes = (prefix: Ref<string> | string) => {
|
||||
const { stackedNotes } = useQueryStackedNotes()
|
||||
const { stackedNotes } = useRouteQueryStackedNotes()
|
||||
const { notes } = useNotes()
|
||||
const titleNotes = computed(() =>
|
||||
notes.value
|
||||
|
||||
Reference in New Issue
Block a user