Topbar.jsx 657 Bytes
import 'common/topbar.scss'

import React from 'react'
import { Layout, Menu, Icon } from 'antd'

const { Header, Sider } = Layout

function Topbar() {
    function handleClick() {
        location.href = '/logout'
    }

    return (
        <Header className="header">
            <a className="header-logo" href="/"></a>
            <Menu mode="horizontal" theme="dark" className="header-menu">
                <Menu.Item className="header-nav">
                    <Icon type="logout"></Icon>
                    <span onClick={handleClick}>退出</span>
                </Menu.Item>
            </Menu>
        </Header>
    )
}

export default Topbar