import { PlusOutlined } from '@ant-design/icons';
import { Button } from 'antd';
import { Outlet, useLocation } from 'react-router';
import { useEffect } from 'react';
import { LayoutMain } from '@/modules/layout';

export const Main = () => {
  const location = useLocation();
  const isEdit = location.pathname.includes('edit/list');
  return (
    <LayoutMain
      title={
        <>
          Chat
          <Button
            className={!isEdit ? 'hidden' : ''}
            icon={<PlusOutlined />}
            onClick={() => {
              console.log('add');
            }}
          />
        </>
      }></LayoutMain>
  );
};
