Fix: manage page button horizontal

This commit is contained in:
2021-12-16 11:43:23 +08:00
parent 435e3605f7
commit b0e57099ba

View File

@@ -18,30 +18,30 @@ function Manage(props) {
</button> </button>
)} )}
{props.user.role !== 0 && ( {props.user.role !== 0 && (
<button <div className="horizontal">
onClick={() => { <button
navigate(`/manage/users/${props.user.id}`); onClick={() => {
}} navigate(`/manage/users/${props.user.id}`);
> }}
Edit >
</button> Edit
)} </button>
{props.user.role !== 0 && ( <button
<button onClick={() => {
onClick={() => { fetch("/api/v1/logout")
fetch("/api/v1/logout") .then((res) => res.json())
.then((res) => res.json()) .then((data) => {
.then((data) => { if (data.error) {
if (data.error) { alert(data.error);
alert(data.error); } else {
} else { props.setUser(data.user);
props.setUser(data.user); }
} });
}); }}
}} >
> Logout
Logout </button>
</button> </div>
)} )}
<hr /> <hr />
<div className="horizontal"> <div className="horizontal">