cf5cc6a9cc
Use constants for mutation types as per vuex docs
15 lines
318 B
JavaScript
15 lines
318 B
JavaScript
export const notes = state => state.notes;
|
|
|
|
export const targetNoteHash = state => state.targetNoteHash;
|
|
|
|
export const notesById = (state) => {
|
|
const notesByIdObject = {};
|
|
|
|
state.notes.forEach((note) => {
|
|
note.notes.forEach((n) => {
|
|
notesByIdObject[n.id] = n;
|
|
});
|
|
});
|
|
|
|
return notesByIdObject;
|
|
};
|