Updated the ExamList to only appear to developers

This commit is contained in:
Tiago Ribeiro
2023-10-15 23:03:54 +01:00
parent 1895ffb5c3
commit 69425d0b93

View File

@@ -20,17 +20,19 @@ export default function Lists({user}: {user: User}) {
}> }>
User List User List
</Tab> </Tab>
<Tab {user.type === "developer" && (
className={({selected}) => <Tab
clsx( className={({selected}) =>
"w-full rounded-lg py-2.5 text-sm font-medium leading-5 text-mti-purple-light", clsx(
"ring-white ring-opacity-60 ring-offset-2 ring-offset-mti-purple-light focus:outline-none focus:ring-2", "w-full rounded-lg py-2.5 text-sm font-medium leading-5 text-mti-purple-light",
"transition duration-300 ease-in-out", "ring-white ring-opacity-60 ring-offset-2 ring-offset-mti-purple-light focus:outline-none focus:ring-2",
selected ? "bg-white shadow" : "text-blue-100 hover:bg-white/[0.12] hover:text-mti-purple-dark", "transition duration-300 ease-in-out",
) selected ? "bg-white shadow" : "text-blue-100 hover:bg-white/[0.12] hover:text-mti-purple-dark",
}> )
Exam List }>
</Tab> Exam List
</Tab>
)}
<Tab <Tab
className={({selected}) => className={({selected}) =>
clsx( clsx(
@@ -47,9 +49,11 @@ export default function Lists({user}: {user: User}) {
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow"> <Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
<UserList user={user} /> <UserList user={user} />
</Tab.Panel> </Tab.Panel>
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow"> {user.type === "developer" && (
<ExamList user={user} /> <Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
</Tab.Panel> <ExamList user={user} />
</Tab.Panel>
)}
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow"> <Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
<GroupList user={user} /> <GroupList user={user} />
</Tab.Panel> </Tab.Panel>