add single note page

This commit is contained in:
Ren Amamiya
2023-04-30 11:48:38 +07:00
parent 2a1b64fdfe
commit fdbdaaa384
16 changed files with 349 additions and 100 deletions

View File

@@ -1,13 +1,6 @@
import { atom } from 'jotai';
import { atomWithReset } from 'jotai/utils';
// notes
export const notesAtom = atom([]);
export const filteredNotesAtom = atom((get) => {
const notes = get(notesAtom);
return notes.filter((item, index) => index === notes.findIndex((other) => item.parent_id === other.parent_id));
});
// note content
export const noteContentAtom = atomWithReset('');