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

displaying text

This commit is contained in:
Fedor Katurov 2019-10-17 14:44:13 +07:00
parent 57f90ee46b
commit 54ce8db210
8 changed files with 51 additions and 22 deletions

View file

@ -19,8 +19,6 @@ const mapStateToProps = state => {
const { editor, errors } = selectNode(state);
const { statuses, files } = selectUploads(state);
console.log('mss', { editor });
return { editor, statuses, files, errors };
};
@ -57,12 +55,10 @@ const EditorDialogUnconnected: FC<IProps> = ({
const onSubmit = useCallback(
(event: FormEvent) => {
console.log({ data, editor });
event.preventDefault();
return;
nodeSave(data);
},
[data, nodeSave, editor]
[data, nodeSave]
);
useEffect(() => {

View file

@ -13,7 +13,7 @@ import { NodeRelated } from '~/components/node/NodeRelated';
import * as styles from './styles.scss';
import { NodeComments } from '~/components/node/NodeComments';
import { NodeTags } from '~/components/node/NodeTags';
import { NODE_COMPONENTS } from '~/redux/node/constants';
import { NODE_COMPONENTS, NODE_INLINES } from '~/redux/node/constants';
import * as NODE_ACTIONS from '~/redux/node/actions';
import { CommentForm } from '~/components/node/CommentForm';
import { selectUser } from '~/redux/auth/selectors';
@ -57,7 +57,8 @@ const NodeLayoutUnconnected: FC<IProps> = ({
[node, nodeUpdateTags]
);
const block = node && node.type && NODE_COMPONENTS[node.type] && NODE_COMPONENTS[node.type];
const block = node && node.type && NODE_COMPONENTS[node.type];
const inline_block = node && node.type && NODE_INLINES[node.type];
return (
<Card className={styles.node} seamless>
@ -69,6 +70,12 @@ const NodeLayoutUnconnected: FC<IProps> = ({
<Padder>
<Group horizontal className={styles.content}>
<Group className={styles.comments}>
{inline_block && (
<div className={styles.inline_block}>
{createElement(inline_block, { node, is_loading, updateLayout, layout })}
</div>
)}
{is_loading_comments || !comments.length ? (
<NodeNoComments is_loading={is_loading_comments} />
) : (