♻️ (flux note) move in a component flux …
flux note will be used for fleeting notes and drafts too
This commit is contained in:
@@ -8,8 +8,8 @@ let initial = true
|
||||
|
||||
export const useQueryStackedNotes = () => {
|
||||
const { query } = useRoute()
|
||||
if (initial) {
|
||||
initial = false
|
||||
|
||||
const setStackedNotes = () => {
|
||||
stackedNotes.value = (Array.isArray(query.stackedNotes)
|
||||
? query.stackedNotes
|
||||
: [query.stackedNotes]
|
||||
@@ -18,6 +18,11 @@ export const useQueryStackedNotes = () => {
|
||||
.filter((n) => !!n) as string[]
|
||||
}
|
||||
|
||||
if (initial) {
|
||||
initial = false
|
||||
setStackedNotes()
|
||||
}
|
||||
|
||||
return {
|
||||
stackedNotes: readonly(stackedNotes),
|
||||
updateQueryStackedNotes: (newStackedNotes: string[]) =>
|
||||
|
||||
Reference in New Issue
Block a user