project setup

This commit is contained in:
2023-04-27 00:56:13 +02:00
parent 8bd9ca94bb
commit 3579a5894a
18 changed files with 3764 additions and 144 deletions

View File

@@ -0,0 +1,15 @@
import { ref } from 'vue'
const notes = ref<Note[]>([])
export default function useNotes() {
const setDefaultNotes = (defaultNotes: Note[]) => {
notes.value = defaultNotes.map((note) => ({
...note,
created: new Date().getTime(),
modified: new Date().getTime(),
}))
}
const rootNote = notes.value.find((note) => note.isRoot)
return { notes, setDefaultNotes, rootNote }
}