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:
parent
44ab426915
commit
b4b138e90f
16 changed files with 239 additions and 117 deletions
|
@ -4,15 +4,20 @@ import styles from './styles.module.scss';
|
|||
import { Markdown } from '~/components/containers/Markdown';
|
||||
import { formatText } from '~/utils/dom';
|
||||
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
|
||||
import { Paragraph } from '~/components/placeholders/Paragraph';
|
||||
|
||||
const LabDescription: FC<INodeComponentProps> = ({ node }) => {
|
||||
const LabDescription: FC<INodeComponentProps> = ({ node, isLoading }) => {
|
||||
const onClick = useGotoNode(node.id);
|
||||
|
||||
if (!node.description) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
return isLoading ? (
|
||||
<div className={styles.wrap}>
|
||||
<Paragraph />
|
||||
</div>
|
||||
) : (
|
||||
<Markdown
|
||||
className={styles.wrap}
|
||||
dangerouslySetInnerHTML={{ __html: formatText(node.description) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue