fix: remove all page-entry and opening animations for instant, rock-solid page loading
This commit is contained in:
@@ -105,7 +105,7 @@ export default function AIComCBTDPPPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 space-y-6 max-w-6xl mx-auto min-h-screen">
|
||||
{/* Top Header */}
|
||||
<div className="flex flex-col md:flex-row md:items-center justify-between gap-4 bg-secondary/20 border border-border p-6 rounded-3xl backdrop-blur-xl animate-section animate-section-1">
|
||||
<div className="flex flex-col md:flex-row md:items-center justify-between gap-4 bg-secondary/20 border border-border p-6 rounded-3xl backdrop-blur-xl">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link href="/dashboard/dpp">
|
||||
<Button variant="outline" size="icon" className="rounded-xl border-border hover:bg-secondary">
|
||||
@@ -166,7 +166,7 @@ export default function AIComCBTDPPPage() {
|
||||
)}
|
||||
|
||||
{/* Main CBT Grid */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
|
||||
{/* Question Area */}
|
||||
<div className="lg:col-span-3">
|
||||
<Card className="border-border bg-background/80 backdrop-blur-xl p-6 rounded-3xl shadow-xl space-y-6">
|
||||
|
||||
@@ -175,7 +175,7 @@ export default function DPPPage() {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{loading ? (
|
||||
<div className="col-span-2 text-center py-12 text-muted-foreground">Loading AI-generated DPPs...</div>
|
||||
) : filteredDpps.length === 0 ? (
|
||||
|
||||
@@ -91,7 +91,7 @@ export default function CollegePredictorPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 space-y-8 max-w-7xl mx-auto min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -110,7 +110,7 @@ export default function CollegePredictorPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
||||
{/* Left Box: Graph */}
|
||||
<Card className="col-span-1 lg:col-span-2 border-border shadow-sm bg-background">
|
||||
<CardHeader>
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function HeatmapPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 max-w-7xl mx-auto space-y-8 min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -57,7 +57,7 @@ export default function HeatmapPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Strip */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{summaryStats.map((kpi) => (
|
||||
<Card key={kpi.label} className={`rounded-2xl border ${kpi.color} hover:scale-[1.02] transition-transform`}>
|
||||
<CardContent className="p-5 flex flex-col gap-2">
|
||||
@@ -70,7 +70,7 @@ export default function HeatmapPage() {
|
||||
</div>
|
||||
|
||||
{/* Legend / Guidance Row */}
|
||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: "Critical (> 50%)", color: "bg-red-500/20 border-red-500/30 text-red-400", dot: "bg-red-500", desc: "Immediate revision needed" },
|
||||
{ label: "Warning (30–50%)", color: "bg-amber-500/20 border-amber-500/30 text-amber-400", dot: "bg-amber-500", desc: "Focus on these next" },
|
||||
@@ -90,7 +90,7 @@ export default function HeatmapPage() {
|
||||
</div>
|
||||
|
||||
{/* Main 2-col layout */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 animate-section animate-section-3">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
{/* Heatmap — takes 2/3 */}
|
||||
<div className="lg:col-span-2 space-y-3">
|
||||
<div className="flex items-center gap-2 text-sm font-black uppercase tracking-wider text-muted-foreground">
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function AICoachDashboard() {
|
||||
<div className="p-6 max-w-6xl mx-auto space-y-8">
|
||||
|
||||
{/* ── METRICS BAR ── */}
|
||||
<div className="flex flex-wrap items-center justify-end gap-2 pt-2 animate-section animate-section-1">
|
||||
<div className="flex flex-wrap items-center justify-end gap-2 pt-2">
|
||||
<div className="inline-flex items-center gap-1.5 bg-yellow-500/10 text-yellow-500 px-3 py-1.5 rounded-xl text-xs font-bold border border-yellow-500/20">
|
||||
<Flame size={14} className="fill-yellow-500" />
|
||||
{user?.streak_count || 1}-Day Streak
|
||||
@@ -108,10 +108,10 @@ export default function AICoachDashboard() {
|
||||
</div>
|
||||
|
||||
{/* ── DAILY CHALLENGE BANNER ── */}
|
||||
<div className="animate-section animate-section-2"><DailyChallengeBanner /></div>
|
||||
<div className=""><DailyChallengeBanner /></div>
|
||||
|
||||
{/* ── QUICK STATS ── */}
|
||||
<section className="grid grid-cols-2 md:grid-cols-5 gap-4 animate-section animate-section-3">
|
||||
<section className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
{[
|
||||
{ label: "Questions Solved", value: questionsSolved, color: "text-[var(--cyan-ai)]", bg: "bg-[var(--cyan-ai-10)]", border: "border-[var(--cyan-ai-20)]", icon: <FileText size={32} /> },
|
||||
{ label: "Overall Accuracy", value: overallAccuracy, color: "text-amber-500", bg: "bg-amber-500/5", border: "border-amber-500/20", icon: <Target size={32} /> },
|
||||
@@ -130,7 +130,7 @@ export default function AICoachDashboard() {
|
||||
</section>
|
||||
|
||||
{/* ── PREDICTIVE INTELLIGENCE ROW ── */}
|
||||
<section className="mt-10 animate-section animate-section-4">
|
||||
<section className="mt-10">
|
||||
<div className="flex items-center justify-between gap-3 mb-6">
|
||||
<div className="flex items-center gap-2 text-base md:text-lg font-black uppercase tracking-widest text-[var(--cyan-ai)]">
|
||||
<Zap size={20} />
|
||||
@@ -152,7 +152,7 @@ export default function AICoachDashboard() {
|
||||
|
||||
|
||||
{/* ── HEATMAP / STUDY PLAN / WEEKLY REPORT ── */}
|
||||
<section className="grid grid-cols-1 lg:grid-cols-2 gap-8 pt-10 border-t border-border animate-section animate-section-5">
|
||||
<section className="grid grid-cols-1 lg:grid-cols-2 gap-8 pt-10 border-t border-border">
|
||||
<div>
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div className="flex items-center gap-2 text-base font-extrabold">
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function ReadinessPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 space-y-8 max-w-7xl mx-auto min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -54,7 +54,7 @@ export default function ReadinessPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Strip */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: "Overall Score", value: isDemo ? "72 / 100" : "0 / 100", trend: isDemo ? "+5 this week" : "Baseline", trendUp: true, icon: <Gauge size={20} className="text-[var(--cyan-ai)]" /> },
|
||||
{ label: "Accuracy Rate", value: isDemo ? "88%" : "0%", trend: isDemo ? "+3% vs last week" : "0 attempts", trendUp: isDemo, icon: <Target size={20} className="text-amber-400" /> },
|
||||
@@ -76,7 +76,7 @@ export default function ReadinessPage() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<div className="lg:col-span-2 space-y-8">
|
||||
{/* Readiness Score Card */}
|
||||
<Card className="p-6 bg-secondary/10 border-border/60 rounded-3xl">
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function StrategyPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 space-y-8 max-w-7xl mx-auto min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -46,7 +46,7 @@ export default function StrategyPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Strip */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: "Time Per Question", value: isDemo ? "45 sec" : "-- sec", note: isDemo ? "Target: 38 sec" : "Not calibrated", icon: <Clock size={18} className="text-red-400" />, color: "border-red-400/20 bg-red-400/5" },
|
||||
{ label: "Negative Marks Lost", value: isDemo ? "-29" : "0", note: isDemo ? "Last mock test" : "0 negative marks", icon: <AlertTriangle size={18} className="text-amber-400" />, color: "border-amber-400/20 bg-amber-400/5" },
|
||||
@@ -65,7 +65,7 @@ export default function StrategyPage() {
|
||||
</div>
|
||||
|
||||
{/* Main Cards Row */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-2 text-sm font-black uppercase tracking-wider text-muted-foreground">
|
||||
<Target size={16} className="text-[var(--cyan-ai)]" />
|
||||
@@ -136,7 +136,7 @@ export default function StrategyPage() {
|
||||
<Lightbulb size={20} className="text-yellow-400" />
|
||||
<h3 className="text-base font-black tracking-tight">AI Strategy Recommendations</h3>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 animate-section animate-section-3">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{[
|
||||
{ tip: "Start with Chemistry (highest accuracy) to build momentum and bank easy marks in the first 40 minutes.", color: "text-green-400", label: "Opening Strategy" },
|
||||
{ tip: "Attempt Physics only if you are 80%+ confident per question. Otherwise, mark and skip — recover in last 10 min buffer.", color: "text-red-400", label: "Physics Guard" },
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function StudyPlanPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 space-y-8 max-w-7xl mx-auto min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -34,7 +34,7 @@ export default function StudyPlanPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Strip */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: "Tasks Today", value: isDemo ? "5" : "3", sub: isDemo ? "2 completed" : "0 completed", icon: <CheckCircle2 size={18} className="text-green-400" />, color: "border-green-400/20 bg-green-400/5" },
|
||||
{ label: "Study Hours Today", value: isDemo ? "3.8 hrs" : "0.0 hrs", sub: "Target: 5 hrs", icon: <Clock size={18} className="text-[var(--cyan-ai)]" />, color: "border-[var(--cyan-ai-20)] bg-[var(--cyan-ai-10)]" },
|
||||
@@ -52,7 +52,7 @@ export default function StudyPlanPage() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 animate-section animate-section-3">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<div className="lg:col-span-2 space-y-8">
|
||||
{/* Today's Schedule */}
|
||||
<div className="space-y-3">
|
||||
|
||||
@@ -71,7 +71,7 @@ export default function TimeOptimizationPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 max-w-7xl mx-auto space-y-8 min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
|
||||
@@ -91,7 +91,7 @@ export default function TimeOptimizationPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Strip */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: "Peak Efficiency", value: isDemo ? "95%" : "--", sub: isDemo ? "2–5 PM window" : "Calibrating", color: "border-yellow-400/20 bg-yellow-400/5", icon: <Sun size={18} className="text-yellow-400" /> },
|
||||
{ label: "Study Hrs Today", value: isDemo ? "3.8 h" : "0.0 h", sub: "Target: 6 h", color: "border-[var(--cyan-ai-20)] bg-[var(--cyan-ai-10)]", icon: <Clock size={18} className="text-[var(--cyan-ai)]" /> },
|
||||
@@ -109,7 +109,7 @@ export default function TimeOptimizationPage() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
{/* Chart — 2/3 */}
|
||||
<div className="lg:col-span-2 space-y-4">
|
||||
<div className="flex items-center gap-2 text-sm font-black uppercase tracking-wider text-muted-foreground">
|
||||
|
||||
@@ -6,7 +6,7 @@ import { BrainCircuit, Sparkles } from "lucide-react"
|
||||
export default function TutorChatPage() {
|
||||
return (
|
||||
<div className="h-[calc(100vh-100px)] w-full flex flex-col pt-4 max-w-7xl mx-auto px-4 gap-4">
|
||||
<div className="border-b border-border/50 pb-4 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-4">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-1">
|
||||
@@ -26,7 +26,7 @@ export default function TutorChatPage() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-1 rounded-3xl overflow-hidden border border-border/50 shadow-xl bg-background flex flex-col h-full animate-section animate-section-2">
|
||||
<div className="flex-1 rounded-3xl overflow-hidden border border-border/50 shadow-xl bg-background flex flex-col h-full">
|
||||
<TutorChat />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function WeeklyProgressPage() {
|
||||
return (
|
||||
<div className="p-6 md:p-8 max-w-7xl mx-auto space-y-8 min-h-screen">
|
||||
{/* Page Header */}
|
||||
<div className="border-b border-border/50 pb-6 animate-section animate-section-1">
|
||||
<div className="border-b border-border/50 pb-6">
|
||||
<div className="flex items-start justify-between gap-4 flex-wrap">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-1">
|
||||
@@ -65,7 +65,7 @@ export default function WeeklyProgressPage() {
|
||||
</div>
|
||||
|
||||
{/* KPI Stats Row */}
|
||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4 animate-section animate-section-1">
|
||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
{stats.map((stat) => (
|
||||
<Card key={stat.label} className="bg-secondary/20 border-border/60 rounded-2xl">
|
||||
<CardContent className="p-4">
|
||||
@@ -80,7 +80,7 @@ export default function WeeklyProgressPage() {
|
||||
</div>
|
||||
|
||||
{/* Main Content Grid */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 animate-section animate-section-2">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
{/* Weekly Bar Chart */}
|
||||
<div className="lg:col-span-2 space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user