1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added placeholders

This commit is contained in:
Fedor Katurov 2021-04-21 12:58:44 +07:00
parent 44ab426915
commit b4b138e90f
16 changed files with 239 additions and 117 deletions

View file

@ -5,15 +5,20 @@ import { formatTextParagraphs } from '~/utils/dom';
import { path } from 'ramda';
import styles from './styles.module.scss';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { Paragraph } from '~/components/placeholders/Paragraph';
const LabText: FC<INodeComponentProps> = ({ node }) => {
const LabText: FC<INodeComponentProps> = ({ node, isLoading }) => {
const content = useMemo(() => formatTextParagraphs(path(['blocks', 0, 'text'], node) || ''), [
node.blocks,
]);
const onClick = useGotoNode(node.id);
return (
return isLoading ? (
<div className={styles.wrap}>
<Paragraph lines={5} />
</div>
) : (
<Markdown
dangerouslySetInnerHTML={{ __html: content }}
className={styles.wrap}