import React, { useState, useEffect } from 'react';

import { useHistory } from 'react-router-dom';
import styles from './FlowBoard.less';
import FlowChart from './FlowChartRt';

const FlowBoard = () => {
  const history = useHistory();
  useEffect(() => {}, []);

  const { flowData, flowID, chartLoading, activeKey, flowTree, scrollTop } = history.location.state;
  return (
    <div className={styles.flowChartContainer}>
      <FlowChart
        flowData={flowData}
        flowID={flowID}
        chartLoading={chartLoading}
        activeKey={activeKey}
        flowTree={flowTree}
        scrollTop={scrollTop}
      />
    </div>
  );
};

export default FlowBoard;
