From 53d45271798ef5f0e8def5ea797201363a6b08e0 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 21 Dec 2023 14:06:00 +0800 Subject: [PATCH] Add user type indicator to drawer --- src/Components/Drawer/Drawer.tsx | 42 ++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/Components/Drawer/Drawer.tsx b/src/Components/Drawer/Drawer.tsx index 72b4a49..c84e4e0 100644 --- a/src/Components/Drawer/Drawer.tsx +++ b/src/Components/Drawer/Drawer.tsx @@ -33,20 +33,36 @@ export default function Drawer() { marginRight: "4px", }} /> -

- {user.data - ? user.data.username - : user.isError - ? "Error loading user" - : "Loading user..."} -

+
+

+ {user.data + ? user.data.username + : user.isError + ? "Error loading user" + : "Loading user..."} +

+

+ {user.data && user.data.is_technician + ? "Technician" + : user.data && user.data.is_teacher + ? "Teacher" + : "Student"} +

+
+