Add: register button on manage page

This commit is contained in:
2021-12-17 09:40:22 +08:00
parent d6f9a03786
commit 5608693c06

View File

@@ -9,6 +9,7 @@ function Manage(props) {
<h2>Manage</h2> <h2>Manage</h2>
<p>Hi, {props.user.username}</p> <p>Hi, {props.user.username}</p>
{props.user.role === 0 && ( {props.user.role === 0 && (
<div>
<button <button
onClick={() => { onClick={() => {
navigate("/manage/login"); navigate("/manage/login");
@@ -16,6 +17,14 @@ function Manage(props) {
> >
Login Login
</button> </button>
<button
onClick={() => {
navigate("/manage/register");
}}
>
Register
</button>
</div>
)} )}
{props.user.role !== 0 && ( {props.user.role !== 0 && (
<div className="horizontal"> <div className="horizontal">