Add: register button on manage page

This commit is contained in:
2022-01-03 17:19:05 +08:00
parent d6f9a03786
commit 5608693c06
+16 -7
View File
@@ -9,13 +9,22 @@ 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 && (
<button <div>
onClick={() => { <button
navigate("/manage/login"); onClick={() => {
}} navigate("/manage/login");
> }}
Login >
</button> Login
</button>
<button
onClick={() => {
navigate("/manage/register");
}}
>
Register
</button>
</div>
)} )}
{props.user.role !== 0 && ( {props.user.role !== 0 && (
<div className="horizontal"> <div className="horizontal">