import { Card, Col, Row, Statistic, Typography } from 'antd';
import ReactEcharts from 'echarts-for-react';
// import { useState } from "react";
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-layout';
import { useEffect } from 'react';
import { queryAllRelations } from './systemV2/role/service';
const { Link } = Typography;

const Welcome: React.FC = () => {
  // const [sales, setSales] = useState<number[]>([5, 20, 36, 10, 10, 20]);
  // const [inventorys, setInventorys] = useState<number[]>([15, 30, 46, 20, 20, 40]);
  const sales = [5, 20, 36, 10, 10, 20];
  const inventorys = [15, 30, 46, 20, 20, 40];

  const initFunc = async () => {
    queryAllRelations({ pageSize: 100, current: 0 }).then((res) => {
      console.log("--queryAllRelations---->", res)




    });
  }


  useEffect(() => {
    let isMounted = true
    const fetchPost = async () => {
      if (isMounted) {
        initFunc()
      }
    }

    fetchPost()

    return () => {
      isMounted = false
    }
  }, [])

  return <PageContainer></PageContainer>;
};

export default Welcome;
