Added template for adding restricted buttons in drawer

This commit is contained in:
Keannu Bernasol 2024-01-04 09:58:27 +08:00
parent 444a71fb9d
commit 74976b6512

View file

@ -74,10 +74,7 @@ export default function Drawer() {
</p>
</div>
</div>
{user.isFetched &&
user.data &&
!user.data.is_teacher &&
!user?.data?.is_technician ? (
{!user.data?.is_teacher && !user?.data?.is_technician ? (
<>
<div
style={{
@ -200,6 +197,7 @@ export default function Drawer() {
}
label={"Log out"}
/>
{user.data?.is_teacher ? <p>You are a teacher</p> : null}
</div>
);
}