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

NodeLayout

This commit is contained in:
muerwre 2019-08-25 16:10:46 +07:00
parent 684a4f4474
commit b154277de8
23 changed files with 332 additions and 65 deletions

View file

@ -2,14 +2,17 @@ import React, { FC } from 'react';
import { connect } from 'react-redux';
import { FlowGrid } from '~/components/flow/FlowGrid';
import { selectFlow } from '~/redux/flow/selectors';
import * as NODE_ACTIONS from '~/redux/node/actions';
const mapStateToProps = selectFlow;
const mapDispatchToProps = {};
const mapDispatchToProps = { nodeLoadNode: NODE_ACTIONS.nodeLoadNode };
type IProps = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
const FlowLayoutUnconnected: FC<IProps> = ({ nodes }) => <FlowGrid nodes={nodes} />;
const FlowLayoutUnconnected: FC<IProps> = ({ nodes, nodeLoadNode }) => (
<FlowGrid nodes={nodes} onSelect={nodeLoadNode} />
);
const FlowLayout = connect(
mapStateToProps,