generated from muhtadeetaron/nextjs-template
fix(ui): refactor results page for exam results logic
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
import React from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ChevronLeft, Layers } from "lucide-react";
|
||||
import { ChevronLeft, Layers, Loader } from "lucide-react";
|
||||
import { useTimer } from "@/context/TimerContext";
|
||||
import styles from "@/css/Header.module.css";
|
||||
import { useExam } from "@/context/ExamContext";
|
||||
@ -53,8 +53,12 @@ const Header = ({
|
||||
{displayUser && (
|
||||
<div className={styles.profile}>
|
||||
<Avatar className="bg-gray-200 w-10 h-10">
|
||||
<AvatarFallback className=" text-lg">
|
||||
{user?.username ? user.username.charAt(0).toUpperCase() : "U"}
|
||||
<AvatarFallback className="flex items-center justify-center h-10 text-lg">
|
||||
{user?.username ? (
|
||||
user.username.charAt(0).toUpperCase()
|
||||
) : (
|
||||
<div className="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"></div>
|
||||
)}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<span className={styles.text}>
|
||||
|
||||
Reference in New Issue
Block a user