mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Improved drawer buttons
This commit is contained in:
parent
d878cfb1aa
commit
ff1d465d3f
1 changed files with 49 additions and 53 deletions
|
@ -56,59 +56,55 @@ export default function Sidebar() {
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={styles.flex_row}>
|
<DrawerButton
|
||||||
<HomeIcon
|
onClick={() => {
|
||||||
style={{
|
navigate("/dashboard");
|
||||||
width: "48px",
|
}}
|
||||||
height: "48px",
|
icon={
|
||||||
color: "white",
|
<HomeIcon
|
||||||
marginRight: "2px",
|
style={{
|
||||||
alignSelf: "center",
|
width: "48px",
|
||||||
justifySelf: "center",
|
height: "48px",
|
||||||
}}
|
color: "white",
|
||||||
/>
|
marginRight: "2px",
|
||||||
<p
|
alignSelf: "center",
|
||||||
style={{
|
justifySelf: "center",
|
||||||
...styles.text_light,
|
}}
|
||||||
...styles.text_M,
|
/>
|
||||||
}}
|
}
|
||||||
>
|
label={"Dashboard"}
|
||||||
Dashboard
|
/>
|
||||||
</p>
|
<DrawerButton
|
||||||
</div>
|
onClick={async () => {
|
||||||
<div style={styles.flex_row}>
|
navigate("/");
|
||||||
<DrawerButton
|
await dispatch(auth_toggle());
|
||||||
onClick={async () => {
|
await setAccessToken("");
|
||||||
navigate("/");
|
await setRefreshToken("");
|
||||||
await dispatch(auth_toggle());
|
toast("Logged out", {
|
||||||
await setAccessToken("");
|
position: "top-right",
|
||||||
await setRefreshToken("");
|
autoClose: 2000,
|
||||||
toast("Logged out", {
|
hideProgressBar: false,
|
||||||
position: "top-right",
|
closeOnClick: true,
|
||||||
autoClose: 2000,
|
pauseOnHover: true,
|
||||||
hideProgressBar: false,
|
draggable: true,
|
||||||
closeOnClick: true,
|
progress: undefined,
|
||||||
pauseOnHover: true,
|
theme: "light",
|
||||||
draggable: true,
|
});
|
||||||
progress: undefined,
|
}}
|
||||||
theme: "light",
|
icon={
|
||||||
});
|
<LogoutIcon
|
||||||
}}
|
style={{
|
||||||
icon={
|
width: "48px",
|
||||||
<LogoutIcon
|
height: "48px",
|
||||||
style={{
|
color: "white",
|
||||||
width: "48px",
|
marginRight: "2px",
|
||||||
height: "48px",
|
alignSelf: "center",
|
||||||
color: "white",
|
justifySelf: "center",
|
||||||
marginRight: "2px",
|
}}
|
||||||
alignSelf: "center",
|
/>
|
||||||
justifySelf: "center",
|
}
|
||||||
}}
|
label={"Log out"}
|
||||||
/>
|
/>
|
||||||
}
|
|
||||||
label={"Log out"}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue