Updated the groups section for the teachers and admins

This commit is contained in:
Tiago Ribeiro
2023-10-30 15:27:48 +00:00
parent bd6892dcf1
commit ba3588e97d
4 changed files with 52 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ export default function TeacherDashboard({user}: Props) {
};
const GroupsList = () => {
const filter = (x: Group) => x.admin === user.id;
const filter = (x: Group) => x.admin === user.id || x.participants.includes(user.id);
return (
<>
@@ -126,7 +126,7 @@ export default function TeacherDashboard({user}: Props) {
};
const DefaultDashboard = () => (
<div className="flex flex-col gap-4">
<>
<section className="flex -lg:flex-wrap gap-4 items-center -lg:justify-center lg:justify-start text-center">
<IconCard
onClick={() => setPage("students")}
@@ -188,7 +188,7 @@ export default function TeacherDashboard({user}: Props) {
</div>
</div>
</section>
</div>
</>
);
return (