Added the ability to create groups

This commit is contained in:
Tiago Ribeiro
2023-09-28 11:40:01 +01:00
parent 7af607d476
commit 75fb6ab197
10 changed files with 755 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ import {User} from "@/interfaces/user";
import {Tab} from "@headlessui/react";
import clsx from "clsx";
import ExamList from "./ExamList";
import GroupList from "./GroupList";
import UserList from "./UserList";
export default function Lists({user}: {user: User}) {
@@ -30,6 +31,17 @@ export default function Lists({user}: {user: User}) {
}>
Exam List
</Tab>
<Tab
className={({selected}) =>
clsx(
"w-full rounded-lg py-2.5 text-sm font-medium leading-5 text-mti-purple-light",
"ring-white ring-opacity-60 ring-offset-2 ring-offset-mti-purple-light focus:outline-none focus:ring-2",
"transition duration-300 ease-in-out",
selected ? "bg-white shadow" : "text-blue-100 hover:bg-white/[0.12] hover:text-mti-purple-dark",
)
}>
Group List
</Tab>
</Tab.List>
<Tab.Panels className="mt-2">
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
@@ -38,6 +50,9 @@ export default function Lists({user}: {user: User}) {
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
<ExamList />
</Tab.Panel>
<Tab.Panel className="overflow-y-scroll max-h-[600px] rounded-xl scrollbar-hide shadow">
<GroupList user={user} />
</Tab.Panel>
</Tab.Panels>
</Tab.Group>
);