mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added updates everywhere
This commit is contained in:
parent
a451e30499
commit
b1e68a8a6d
27 changed files with 246 additions and 79 deletions
|
@ -1,19 +1,22 @@
|
|||
import React, { FC, Fragment } from 'react';
|
||||
import React, { FC, Fragment, useCallback } from 'react';
|
||||
import { Cell } from '~/components/flow/Cell';
|
||||
|
||||
import { IFlowState } from '~/redux/flow/reducer';
|
||||
import { INode } from '~/redux/types';
|
||||
import { canEditNode } from '~/utils/node';
|
||||
import { IUser } from '~/redux/auth/types';
|
||||
import { flowSetCellView } from '~/redux/flow/actions';
|
||||
import { useHistory } from 'react-router';
|
||||
import { URLS } from '~/constants/urls';
|
||||
|
||||
type IProps = Partial<IFlowState> & {
|
||||
user: Partial<IUser>;
|
||||
onSelect: (id: INode['id'], type: INode['type']) => void;
|
||||
onChangeCellView: typeof flowSetCellView;
|
||||
onChangeCellView: (id: INode['id'], flow: INode['flow']) => void;
|
||||
};
|
||||
|
||||
export const FlowGrid: FC<IProps> = ({ user, nodes, onSelect, onChangeCellView }) => {
|
||||
export const FlowGrid: FC<IProps> = ({ user, nodes, onChangeCellView }) => {
|
||||
const history = useHistory();
|
||||
const onSelect = useCallback((id: INode['id']) => history.push(URLS.NODE_URL(id)), [history]);
|
||||
|
||||
if (!nodes) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue