chore(ui): refactor subjects ui

This commit is contained in:
shafin-r
2025-08-19 00:28:49 +06:00
parent d74b81e962
commit 399c0b0060

View File

@ -8,7 +8,6 @@ import DestructibleAlert from "@/components/DestructibleAlert";
import BackgroundWrapper from "@/components/BackgroundWrapper";
import { API_URL, getToken } from "@/lib/auth";
import { Loader, RefreshCw } from "lucide-react";
import { v4 as uuidv4 } from "uuid";
import { useAuth } from "@/context/AuthContext";
import { Question } from "@/types/exam";
@ -20,7 +19,6 @@ type Subject = {
export default function PaperScreen() {
const router = useRouter();
const searchParams = useSearchParams();
const { user } = useAuth();
const [subjects, setSubjects] = useState<Subject[]>([]);
@ -96,7 +94,7 @@ export default function PaperScreen() {
<h1 className="text-2xl font-semibold mb-5">
{user?.preparation_unit}
</h1>
<div className="border border-[#c0dafc] flex flex-col gap-4 w-full rounded-[25px] p-4 mb-20">
<div className="border border-[#c0dafc] flex flex-col gap-4 w-full rounded-[25px] p-4">
{subjects.length > 0 ? (
subjects
.filter((subject) => subject.unit === user?.preparation_unit)