Skip to content

Commit

Permalink
remove student answers table, fix loading spinners
Browse files Browse the repository at this point in the history
  • Loading branch information
akmatoff committed May 26, 2024
1 parent d55e6c7 commit debb64b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages/my-groups/GroupStudentsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export default function GroupStudentsPage() {
return (
<div className="flex flex-col gap-4">
<h1 className="font-bold">Список студентов группы</h1>
{isStudentsLoading && <Spinner />}
{isStudentsLoading && (
<div className="py-20">
<Spinner />
</div>
)}
{!isStudentsLoading && <StudentsTable students={students || []} />}
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions src/pages/my-groups/StudentTaskAnswersPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useTaskUserAnswers } from "@/queries/tasks";
import { useParams } from "react-router-dom";
import cn from "classnames";
import { Spinner } from "@nextui-org/react";

export default function StudentTaskAnswersPage() {
const { id } = useParams();
Expand All @@ -11,6 +12,11 @@ export default function StudentTaskAnswersPage() {
<div className="flex flex-col gap-4 w-full">
<h1 className="font-bold">Результаты студента</h1>

{isUserAnswersLoading && (
<div className="py-20">
<Spinner />
</div>
)}
{!isUserAnswersLoading && userAnswers && (
<div className="grid gap-4">
{!userAnswers.length && (
Expand Down
1 change: 0 additions & 1 deletion src/pages/my-groups/StudentTaskAnswersTable.tsx

This file was deleted.

0 comments on commit debb64b

Please sign in to comment.