fix(dashboard): DPP tags properly dynamic based on user target exam

This commit is contained in:
2026-07-08 12:46:44 +05:30
parent c87b305646
commit 1a6168f724
28 changed files with 853 additions and 304 deletions

View File

@@ -115,7 +115,11 @@ export function ExamResult({ payload, onRetake }: ExamResultProps) {
<RotateCcw className="size-5" /> Retake Mock Test
</Button>
<Link href="/dashboard/cbt">
<Button size="lg" className="rounded-xl h-14 px-8 font-bold text-lg shadow-[0_0_20px_-5px_var(--color-primary)] gap-2 w-full sm:w-auto">
<Button
size="lg"
className="rounded-xl h-14 px-8 font-bold text-lg shadow-[0_0_20px_-5px_var(--color-primary)] gap-2 w-full sm:w-auto"
onClick={() => document.fullscreenElement && document.exitFullscreen()}
>
Dashboard <ArrowRight className="size-5" />
</Button>
</Link>

View File

@@ -14,19 +14,17 @@ export function PeriodicTable({ isOpen, onClose }: PeriodicTableProps) {
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-md animate-in fade-in duration-300">
<div className="bg-background border border-border shadow-2xl rounded-2xl overflow-hidden animate-in zoom-in-95 duration-300 flex flex-col w-[90vw] max-w-5xl h-[85vh]">
<div className="bg-background border border-border shadow-2xl rounded-2xl overflow-hidden animate-in zoom-in-95 duration-300 flex flex-col w-[95vw] max-w-[1400px] h-[95vh]">
<div className="p-4 border-b border-border flex justify-between items-center bg-secondary/80">
<h3 className="font-bold text-lg">Periodic Table of Elements</h3>
<div className="flex gap-2">
<Button variant="outline" size="sm"><ExternalLink size={14} className="mr-2"/> Open Fullscreen</Button>
<button onClick={onClose} className="text-muted-foreground hover:text-foreground ml-2 p-2">
<X size={24} />
</button>
</div>
</div>
<div className="flex-1 bg-zinc-950 p-6 flex items-center justify-center relative overflow-auto">
{/* We will use a high quality remote SVG/image for the periodic table reference */}
<div className="relative w-full h-full min-w-[800px] min-h-[500px]">
<div className="flex-1 bg-white p-4 flex items-start justify-start relative overflow-auto">
<div className="relative w-[1800px] h-[1100px] shrink-0">
{/* Using a reliable wikimedia SVG for Periodic Table as a reference */}
<Image
src="https://upload.wikimedia.org/wikipedia/commons/4/4d/Periodic_table_large.svg"

View File

@@ -23,9 +23,11 @@ export function StreakOnboardingModal() {
const streak = user.streak_count;
const targetExam = user.target_exam?.replace("_", " ") || "JEE/NEET";
// Streak-based wishes and titles
let wishTitle = "Welcome to PragatiVeer! 🌟";
let wishMessage = "Prepare yourself to conquer JEE/NEET. Your daily practice starts here!";
let wishMessage = `Prepare yourself to conquer ${targetExam}. Your daily practice starts here!`;
let iconTheme = "text-[#00F0FF] bg-[#00F0FF]/10";
let iconComponent = <Sparkles className="size-10" />;

View File

@@ -1,6 +1,7 @@
"use client"
import { Flame } from "lucide-react"
import { motion } from "framer-motion"
interface StreakCounterProps {
streak: number
@@ -8,9 +9,15 @@ interface StreakCounterProps {
export function StreakCounter({ streak }: StreakCounterProps) {
return (
<div className="flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-500 font-bold shadow-[0_0_10px_-2px_rgba(249,115,22,0.5)] cursor-default transition-transform hover:scale-105">
<motion.div
initial={{ scale: 0.5, opacity: 0, y: -10 }}
animate={{ scale: 1, opacity: 1, y: 0 }}
whileHover={{ scale: 1.1, rotate: [0, -5, 5, -5, 0] }}
transition={{ type: "spring", stiffness: 300, damping: 15 }}
className="flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-500 font-bold shadow-[0_0_10px_-2px_rgba(249,115,22,0.5)] cursor-default"
>
<Flame size={18} className="animate-pulse" />
<span>{streak}</span>
</div>
</motion.div>
)
}