import React, { useState } from 'react'; import { MenuFoldOutlined, MenuUnfoldOutlined, } from '@ant-design/icons'; import { Layout, Menu, Button, theme } from 'antd'; import type { MenuProps } from 'antd' import { Outlet, useNavigate } from 'react-router-dom'; import styled from 'styled-components'; import LogoCollapsePic from '@/assets/logo_collapse.png'; import LogoNormalPic from '@/assets/logo.png' import { menuRoutes } from '../router/index'; import UserInfoDropdown from '../components/UserInfoDropdown'; const { Header, Sider, Content } = Layout; type MenuItem = Required['items'][number]; const Logo = styled.div` height: 64px; color: white; display:flex; align-items:center; justify-content: center; img { height: 40px; object-fit: contain; } ` const FlexHeaderContent = styled.div` display:flex; align-items:center; justify-content: space-between; height: 100%; padding-right: 24px; box-sizing: border-box; ` const Home: React.FC = () => { const [collapsed, setCollapsed] = useState(false); const { token: { colorBgContainer }, } = theme.useToken(); const navigate = useNavigate(); const onMenuSelect = (item: MenuItem) => { if (typeof item?.key === 'string' && item.key.startsWith("/")) navigate(item.key) } return ( logo
); }; export default Home;