Add: register button on manage page

This commit is contained in:
2022-01-03 17:19:05 +08:00
parent d6f9a03786
commit 5608693c06
+9
View File
@@ -9,6 +9,7 @@ function Manage(props) {
<h2>Manage</h2>
<p>Hi, {props.user.username}</p>
{props.user.role === 0 && (
<div>
<button
onClick={() => {
navigate("/manage/login");
@@ -16,6 +17,14 @@ function Manage(props) {
>
Login
</button>
<button
onClick={() => {
navigate("/manage/register");
}}
>
Register
</button>
</div>
)}
{props.user.role !== 0 && (
<div className="horizontal">