Add willLog() and control access to signup page.

This commit is contained in:
Yang Luo
2021-05-08 00:23:08 +08:00
parent 75f23478d1
commit e3b3a76088
7 changed files with 73 additions and 35 deletions

View File

@ -219,20 +219,20 @@ class App extends Component {
if (this.state.account === undefined) {
return null;
} else if (this.state.account === null) {
res.push(
<Menu.Item key="100" style={{float: 'right', marginRight: '20px'}}>
<Link to="/signup">
{i18next.t("account:Sign Up")}
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="101" style={{float: 'right'}}>
<Link to="/login">
{i18next.t("account:Login")}
</Link>
</Menu.Item>
);
// res.push(
// <Menu.Item key="100" style={{float: 'right', marginRight: '20px'}}>
// <Link to="/signup">
// {i18next.t("account:Sign Up")}
// </Link>
// </Menu.Item>
// );
// res.push(
// <Menu.Item key="101" style={{float: 'right'}}>
// <Link to="/login">
// {i18next.t("account:Login")}
// </Link>
// </Menu.Item>
// );
} else {
res.push(this.renderRightDropdown());
}