generated from muhtadeetaron/nextjs-template
fix(nav): improve redirection logic
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
import React from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { BadgeCheck, ChevronLeft, Layers } from "lucide-react";
|
||||
import styles from "@/css/Header.module.css";
|
||||
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
||||
import { useModal } from "@/context/ModalContext";
|
||||
import { useAuthStore } from "@/stores/authStore";
|
||||
@ -84,33 +83,48 @@ const Header = ({
|
||||
|
||||
{/* Exam timer header */}
|
||||
{timeRemaining > 0 && (
|
||||
<div className={styles.examHeader}>
|
||||
<button onClick={showExitDialog} className={styles.iconButton}>
|
||||
<div className="flex justify-between w-full items-center">
|
||||
<button
|
||||
onClick={showExitDialog}
|
||||
className="bg-none border-none cursor-pointer p-1 flex items-center justify-center"
|
||||
>
|
||||
<ChevronLeft size={30} color="white" />
|
||||
</button>
|
||||
|
||||
<div className={styles.timer}>
|
||||
<div className={styles.timeUnit}>
|
||||
<span className={styles.timeValue}>
|
||||
<div className="w-40 h-14 bg-white flex justify-around items-center rounded-2xl ">
|
||||
<div className="flex flex-col items-center w-full">
|
||||
<span className="font-medium text-md text-[#082E5E]">
|
||||
{String(hours).padStart(2, "0")}
|
||||
</span>
|
||||
<span className={styles.timeLabel}>Hrs</span>
|
||||
<span className="font-medium text-[12px] text-[#082E5E]">
|
||||
Hrs
|
||||
</span>
|
||||
</div>
|
||||
<div className={styles.timeUnit}>
|
||||
<span className={styles.timeValue}>
|
||||
<div className="flex flex-col items-center w-full">
|
||||
<span className="font-medium text-md text-[#082E5E]">
|
||||
{String(minutes).padStart(2, "0")}
|
||||
</span>
|
||||
<span className={styles.timeLabel}>Mins</span>
|
||||
<span className="font-medium text-[12px] text-[#082E5E]">
|
||||
Mins
|
||||
</span>
|
||||
</div>
|
||||
<div className={styles.timeUnit} style={{ borderRight: "none" }}>
|
||||
<span className={styles.timeValue}>
|
||||
<div
|
||||
className="flex flex-col items-center w-full"
|
||||
style={{ borderRight: "none" }}
|
||||
>
|
||||
<span className="font-medium text-md text-[#082E5E]">
|
||||
{String(seconds).padStart(2, "0")}
|
||||
</span>
|
||||
<span className={styles.timeLabel}>Secs</span>
|
||||
<span className="font-medium text-[12px] text-[#082E5E]">
|
||||
Secs
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button onClick={open} className={`${styles.iconButton}`}>
|
||||
<button
|
||||
onClick={open}
|
||||
className="bg-none border-none cursor-pointer p-1 flex items-center justify-center"
|
||||
>
|
||||
<Layers size={30} color="white" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user