1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

fixed text blocks

This commit is contained in:
Fedor Katurov 2019-11-27 10:01:10 +07:00
parent 1169a90553
commit e3bfacddcb
2 changed files with 8 additions and 3 deletions

View file

@ -1,7 +1,7 @@
import React, { FC } from 'react';
import { INode } from '~/redux/types';
import path from 'ramda/es/path';
import { formatText } from '~/utils/dom';
import { formatTextParagraphs } from '~/utils/dom';
import * as styles from './styles.scss';
interface IProps {
@ -12,7 +12,7 @@ const NodeTextBlock: FC<IProps> = ({ node }) => (
<div
className={styles.text}
dangerouslySetInnerHTML={{
__html: formatText(path(['blocks', 0, 'text'], node)),
__html: formatTextParagraphs(path(['blocks', 0, 'text'], node)),
}}
/>
);