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