Commit 41ad482a authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

add loginout

parent b92bcbb1
...@@ -103,6 +103,14 @@ class GlobalHeaderRight extends Component<GlobalHeaderRightProps> { ...@@ -103,6 +103,14 @@ class GlobalHeaderRight extends Component<GlobalHeaderRightProps> {
return; return;
} }
const { key } = event; const { key } = event;
if (key === 'logout') {
const { dispatch } = this.props;
dispatch!({
type: 'login/logout',
});
return;
}
router.push(`/account/${key}`); router.push(`/account/${key}`);
}; };
render() { render() {
...@@ -117,11 +125,11 @@ class GlobalHeaderRight extends Component<GlobalHeaderRightProps> { ...@@ -117,11 +125,11 @@ class GlobalHeaderRight extends Component<GlobalHeaderRightProps> {
<Icon type="setting" /> <Icon type="setting" />
<FormattedMessage id="menu.account.settings" defaultMessage="account settings" /> <FormattedMessage id="menu.account.settings" defaultMessage="account settings" />
</Menu.Item> </Menu.Item>
{/* <Menu.Divider /> */} <Menu.Divider />
{/* <Menu.Item key="logout"> <Menu.Item key="logout">
<Icon type="logout" /> <Icon type="logout" />
<FormattedMessage id="menu.account.logout" defaultMessage="logout" /> <FormattedMessage id="menu.account.logout" defaultMessage="logout" />
</Menu.Item> */} </Menu.Item>
</Menu> </Menu>
); );
const noticeData = this.getNoticeData(); const noticeData = this.getNoticeData();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment