use custom skeleton for note

This commit is contained in:
Ren Amamiya
2023-05-08 09:32:01 +07:00
parent 348dc9009c
commit 5d9b440dc8
10 changed files with 41 additions and 27 deletions

View File

@@ -6,8 +6,10 @@ import { NoteWrapper } from '@lume/app/note/components/wrapper';
import { noteParser } from '@lume/utils/parser';
import { isTagsIncludeID } from '@lume/utils/transform';
import { useMemo } from 'react';
export const NoteBase = ({ event }: { event: any }) => {
const content = noteParser(event);
const content = useMemo(() => noteParser(event), [event]);
const checkParentID = isTagsIncludeID(event.parent_id, event.tags);
const href = event.parent_id ? `/app/note?id=${event.parent_id}` : `/app/note?id=${event.event_id}`;