ENCOA-316 ENCOA-317:
Refactor components to remove Layout wrapper and pass it in the App component , implemented a skeleton feedback while loading page and improved API calls related to Dashboard/User Profile
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import Button from "@/components/Low/Button";
|
||||
import ProgressBar from "@/components/Low/ProgressBar";
|
||||
import Modal from "@/components/Modal";
|
||||
import useUsers from "@/hooks/useUsers";
|
||||
import { Grading, Module } from "@/interfaces";
|
||||
import { Assignment } from "@/interfaces/results";
|
||||
import { Group, Stat, User } from "@/interfaces/user";
|
||||
import { Stat, User } from "@/interfaces/user";
|
||||
import useExamStore from "@/stores/exam";
|
||||
import { getExamById } from "@/utils/exams";
|
||||
import { sortByModule } from "@/utils/moduleUtils";
|
||||
import { calculateBandScore, getGradingLabel } from "@/utils/score";
|
||||
import { convertToUserSolutions } from "@/utils/stats";
|
||||
import { getUserName } from "@/utils/users";
|
||||
import axios from "axios";
|
||||
import clsx from "clsx";
|
||||
@@ -23,13 +20,11 @@ import { withIronSessionSsr } from "iron-session/next";
|
||||
import { checkAccess, doesEntityAllow } from "@/utils/permissions";
|
||||
import { mapBy, redirect, serialize } from "@/utils";
|
||||
import { getAssignment } from "@/utils/assignments.be";
|
||||
import { getEntitiesUsers, getEntityUsers, getUsers } from "@/utils/users.be";
|
||||
import { getEntitiesWithRoles, getEntityWithRoles } from "@/utils/entities.be";
|
||||
import { getGroups, getGroupsByEntities, getGroupsByEntity } from "@/utils/groups.be";
|
||||
import { getEntityUsers, getUsers } from "@/utils/users.be";
|
||||
import { getEntityWithRoles } from "@/utils/entities.be";
|
||||
import { sessionOptions } from "@/lib/session";
|
||||
import { EntityWithRoles } from "@/interfaces/entity";
|
||||
import Head from "next/head";
|
||||
import Layout from "@/components/High/Layout";
|
||||
import Separator from "@/components/Low/Separator";
|
||||
import Link from "next/link";
|
||||
import { requestUser } from "@/utils/api";
|
||||
@@ -353,7 +348,7 @@ export default function AssignmentView({ user, users, entity, assignment, gradin
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<Layout user={user}>
|
||||
<>
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="w-full flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -466,7 +461,7 @@ export default function AssignmentView({ user, users, entity, assignment, gradin
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
</>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user