From f67ed2cfdd16c8060fa5b3eb1221aee8a4ec6bec Mon Sep 17 00:00:00 2001 From: ectasy663 Date: Fri, 23 Oct 2026 17:52:24 +0530 Subject: [PATCH] fix: remove all page-entry and opening animations for instant, rock-solid page loading --- .../dashboard/ai-coach/cbt-dpp/[id]/page.tsx | 4 +- src/app/dashboard/ai-coach/cbt-dpp/page.tsx | 2 +- .../ai-coach/college-predictor/page.tsx | 4 +- src/app/dashboard/ai-coach/heatmap/page.tsx | 8 ++-- src/app/dashboard/ai-coach/page.tsx | 10 ++--- src/app/dashboard/ai-coach/readiness/page.tsx | 6 +-- src/app/dashboard/ai-coach/strategy/page.tsx | 8 ++-- .../dashboard/ai-coach/study-plan/page.tsx | 6 +-- .../ai-coach/time-optimization/page.tsx | 6 +-- src/app/dashboard/ai-coach/tutor/page.tsx | 4 +- .../ai-coach/weekly-progress/page.tsx | 6 +-- src/app/dashboard/analytics/page.tsx | 4 +- .../cbt/history/[attemptId]/page.tsx | 4 +- src/app/dashboard/cbt/page.tsx | 6 +-- src/app/dashboard/community/page.tsx | 10 ++--- src/app/dashboard/dpp/page.tsx | 6 +-- src/app/dashboard/layout.tsx | 2 +- src/app/dashboard/leaderboard/page.tsx | 4 +- src/app/dashboard/materials/page.tsx | 6 +-- src/app/dashboard/page.tsx | 8 ++-- src/app/dashboard/progress/page.tsx | 10 ++--- src/app/dashboard/rank-predictor/page.tsx | 4 +- src/app/dashboard/settings/page.tsx | 4 +- src/app/dashboard/settings/password/page.tsx | 4 +- src/app/dashboard/streaks/page.tsx | 6 +-- src/app/globals.css | 45 +++++-------------- src/components/PremiumGate.tsx | 2 +- 27 files changed, 84 insertions(+), 105 deletions(-) diff --git a/src/app/dashboard/ai-coach/cbt-dpp/[id]/page.tsx b/src/app/dashboard/ai-coach/cbt-dpp/[id]/page.tsx index 2249042..d96f2d8 100644 --- a/src/app/dashboard/ai-coach/cbt-dpp/[id]/page.tsx +++ b/src/app/dashboard/ai-coach/cbt-dpp/[id]/page.tsx @@ -105,7 +105,7 @@ export default function AIComCBTDPPPage() { return (
{/* Top Header */} -
+
-
+
{loading ? (
Loading AI-generated DPPs...
) : filteredDpps.length === 0 ? ( diff --git a/src/app/dashboard/ai-coach/college-predictor/page.tsx b/src/app/dashboard/ai-coach/college-predictor/page.tsx index d54ab50..7c5eda3 100644 --- a/src/app/dashboard/ai-coach/college-predictor/page.tsx +++ b/src/app/dashboard/ai-coach/college-predictor/page.tsx @@ -91,7 +91,7 @@ export default function CollegePredictorPage() { return (
{/* Page Header */} -
+

@@ -110,7 +110,7 @@ export default function CollegePredictorPage() {

-
+
{/* Left Box: Graph */} diff --git a/src/app/dashboard/ai-coach/heatmap/page.tsx b/src/app/dashboard/ai-coach/heatmap/page.tsx index 8b7dce6..df2a614 100644 --- a/src/app/dashboard/ai-coach/heatmap/page.tsx +++ b/src/app/dashboard/ai-coach/heatmap/page.tsx @@ -37,7 +37,7 @@ export default function HeatmapPage() { return (
{/* Page Header */} -
+

@@ -57,7 +57,7 @@ export default function HeatmapPage() {

{/* KPI Strip */} -
+
{summaryStats.map((kpi) => ( @@ -70,7 +70,7 @@ export default function HeatmapPage() {
{/* Legend / Guidance Row */} -
+
{[ { 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() {
{/* Main 2-col layout */} -
+
{/* Heatmap — takes 2/3 */}
diff --git a/src/app/dashboard/ai-coach/page.tsx b/src/app/dashboard/ai-coach/page.tsx index fe5cdfa..0547043 100644 --- a/src/app/dashboard/ai-coach/page.tsx +++ b/src/app/dashboard/ai-coach/page.tsx @@ -92,7 +92,7 @@ export default function AICoachDashboard() {
{/* ── METRICS BAR ── */} -
+
{user?.streak_count || 1}-Day Streak @@ -108,10 +108,10 @@ export default function AICoachDashboard() {
{/* ── DAILY CHALLENGE BANNER ── */} -
+
{/* ── QUICK STATS ── */} -
+
{[ { label: "Questions Solved", value: questionsSolved, color: "text-[var(--cyan-ai)]", bg: "bg-[var(--cyan-ai-10)]", border: "border-[var(--cyan-ai-20)]", icon: }, { label: "Overall Accuracy", value: overallAccuracy, color: "text-amber-500", bg: "bg-amber-500/5", border: "border-amber-500/20", icon: }, @@ -130,7 +130,7 @@ export default function AICoachDashboard() {
{/* ── PREDICTIVE INTELLIGENCE ROW ── */} -
+
@@ -152,7 +152,7 @@ export default function AICoachDashboard() { {/* ── HEATMAP / STUDY PLAN / WEEKLY REPORT ── */} -
+
diff --git a/src/app/dashboard/ai-coach/readiness/page.tsx b/src/app/dashboard/ai-coach/readiness/page.tsx index 3993897..e248492 100644 --- a/src/app/dashboard/ai-coach/readiness/page.tsx +++ b/src/app/dashboard/ai-coach/readiness/page.tsx @@ -34,7 +34,7 @@ export default function ReadinessPage() { return (
{/* Page Header */} -
+

@@ -54,7 +54,7 @@ export default function ReadinessPage() {

{/* KPI Strip */} -
+
{[ { label: "Overall Score", value: isDemo ? "72 / 100" : "0 / 100", trend: isDemo ? "+5 this week" : "Baseline", trendUp: true, icon: }, { label: "Accuracy Rate", value: isDemo ? "88%" : "0%", trend: isDemo ? "+3% vs last week" : "0 attempts", trendUp: isDemo, icon: }, @@ -76,7 +76,7 @@ export default function ReadinessPage() { ))}
-
+
{/* Readiness Score Card */} diff --git a/src/app/dashboard/ai-coach/strategy/page.tsx b/src/app/dashboard/ai-coach/strategy/page.tsx index 51f30e7..05dff3a 100644 --- a/src/app/dashboard/ai-coach/strategy/page.tsx +++ b/src/app/dashboard/ai-coach/strategy/page.tsx @@ -26,7 +26,7 @@ export default function StrategyPage() { return (
{/* Page Header */} -
+

@@ -46,7 +46,7 @@ export default function StrategyPage() {

{/* KPI Strip */} -
+
{[ { label: "Time Per Question", value: isDemo ? "45 sec" : "-- sec", note: isDemo ? "Target: 38 sec" : "Not calibrated", icon: , 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: , color: "border-amber-400/20 bg-amber-400/5" }, @@ -65,7 +65,7 @@ export default function StrategyPage() {
{/* Main Cards Row */} -
+
@@ -136,7 +136,7 @@ export default function StrategyPage() {

AI Strategy Recommendations

-
+
{[ { 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" }, diff --git a/src/app/dashboard/ai-coach/study-plan/page.tsx b/src/app/dashboard/ai-coach/study-plan/page.tsx index 2522efc..3e11ccd 100644 --- a/src/app/dashboard/ai-coach/study-plan/page.tsx +++ b/src/app/dashboard/ai-coach/study-plan/page.tsx @@ -14,7 +14,7 @@ export default function StudyPlanPage() { return (
{/* Page Header */} -
+

@@ -34,7 +34,7 @@ export default function StudyPlanPage() {

{/* KPI Strip */} -
+
{[ { label: "Tasks Today", value: isDemo ? "5" : "3", sub: isDemo ? "2 completed" : "0 completed", icon: , 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: , color: "border-[var(--cyan-ai-20)] bg-[var(--cyan-ai-10)]" }, @@ -52,7 +52,7 @@ export default function StudyPlanPage() { ))}
-
+
{/* Today's Schedule */}
diff --git a/src/app/dashboard/ai-coach/time-optimization/page.tsx b/src/app/dashboard/ai-coach/time-optimization/page.tsx index 3893d03..90c1713 100644 --- a/src/app/dashboard/ai-coach/time-optimization/page.tsx +++ b/src/app/dashboard/ai-coach/time-optimization/page.tsx @@ -71,7 +71,7 @@ export default function TimeOptimizationPage() { return (
{/* Page Header */} -
+

@@ -91,7 +91,7 @@ export default function TimeOptimizationPage() {

{/* KPI Strip */} -
+
{[ { label: "Peak Efficiency", value: isDemo ? "95%" : "--", sub: isDemo ? "2–5 PM window" : "Calibrating", color: "border-yellow-400/20 bg-yellow-400/5", icon: }, { 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: }, @@ -109,7 +109,7 @@ export default function TimeOptimizationPage() { ))}
-
+
{/* Chart — 2/3 */}
diff --git a/src/app/dashboard/ai-coach/tutor/page.tsx b/src/app/dashboard/ai-coach/tutor/page.tsx index a09b833..433caa9 100644 --- a/src/app/dashboard/ai-coach/tutor/page.tsx +++ b/src/app/dashboard/ai-coach/tutor/page.tsx @@ -6,7 +6,7 @@ import { BrainCircuit, Sparkles } from "lucide-react" export default function TutorChatPage() { return (
-
+

@@ -26,7 +26,7 @@ export default function TutorChatPage() {

-
+
diff --git a/src/app/dashboard/ai-coach/weekly-progress/page.tsx b/src/app/dashboard/ai-coach/weekly-progress/page.tsx index 3527dcd..4c70eb6 100644 --- a/src/app/dashboard/ai-coach/weekly-progress/page.tsx +++ b/src/app/dashboard/ai-coach/weekly-progress/page.tsx @@ -43,7 +43,7 @@ export default function WeeklyProgressPage() { return (
{/* Page Header */} -
+

@@ -65,7 +65,7 @@ export default function WeeklyProgressPage() {

{/* KPI Stats Row */} -
+
{stats.map((stat) => ( @@ -80,7 +80,7 @@ export default function WeeklyProgressPage() {
{/* Main Content Grid */} -
+
{/* Weekly Bar Chart */}
diff --git a/src/app/dashboard/analytics/page.tsx b/src/app/dashboard/analytics/page.tsx index 06485fb..87828b4 100644 --- a/src/app/dashboard/analytics/page.tsx +++ b/src/app/dashboard/analytics/page.tsx @@ -59,7 +59,7 @@ export default function AnalyticsPage() { return (
-
+

@@ -73,7 +73,7 @@ export default function AnalyticsPage() {

-
+
Projected Score Trajectory diff --git a/src/app/dashboard/cbt/history/[attemptId]/page.tsx b/src/app/dashboard/cbt/history/[attemptId]/page.tsx index 0a85afb..92d2909 100644 --- a/src/app/dashboard/cbt/history/[attemptId]/page.tsx +++ b/src/app/dashboard/cbt/history/[attemptId]/page.tsx @@ -93,7 +93,7 @@ export default function AttemptHistoryPage({ params }: { params: Promise<{ attem {test?.type === 'DPS' ? 'Back to PrepPilot AI' : 'Back to Tests'} -
+

{test?.title || 'Practice Test'} Solutions

Review your performance, detailed solutions, and identify your weak spots.

@@ -127,7 +127,7 @@ export default function AttemptHistoryPage({ params }: { params: Promise<{ attem
-
+

Answer Key & Explanations

{attempt.answers.map((ans: any, idx: number) => { diff --git a/src/app/dashboard/cbt/page.tsx b/src/app/dashboard/cbt/page.tsx index 893c7d4..ca06c64 100644 --- a/src/app/dashboard/cbt/page.tsx +++ b/src/app/dashboard/cbt/page.tsx @@ -164,7 +164,7 @@ export default function CBTPage() { return ( <>
-
+

@@ -198,7 +198,7 @@ export default function CBTPage() { -
+

Upcoming & Active Exams

@@ -334,7 +334,7 @@ export default function CBTPage() { })()}
-
+

Past Attempts

diff --git a/src/app/dashboard/community/page.tsx b/src/app/dashboard/community/page.tsx index 6174324..9ad2260 100644 --- a/src/app/dashboard/community/page.tsx +++ b/src/app/dashboard/community/page.tsx @@ -89,7 +89,7 @@ export default function CommunityPage() { if (!hasAccessTo("doubt-resolution-community") && !isDemo) { return (
-
+

@@ -102,7 +102,7 @@ export default function CommunityPage() {

-
+
@@ -123,7 +123,7 @@ export default function CommunityPage() { return (
-
+

@@ -143,7 +143,7 @@ export default function CommunityPage() {

-
+
@@ -165,7 +165,7 @@ export default function CommunityPage() {
-
+
{loading ? (
Loading doubts...
) : (<>{filteredDoubts.map((doubt) => ( diff --git a/src/app/dashboard/dpp/page.tsx b/src/app/dashboard/dpp/page.tsx index 1df29d8..e433d1e 100644 --- a/src/app/dashboard/dpp/page.tsx +++ b/src/app/dashboard/dpp/page.tsx @@ -136,7 +136,7 @@ export default function AIDailyPracticePage() { return (
{/* Page Header */} -
+

@@ -152,7 +152,7 @@ export default function AIDailyPracticePage() {

{/* Calendar Filter & Controller Bar */} -
+
-
+
{loading ? (
Loading AI-generated DPPs...
) : filteredDpps.length === 0 ? ( diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx index f718be5..864164d 100644 --- a/src/app/dashboard/layout.tsx +++ b/src/app/dashboard/layout.tsx @@ -430,7 +430,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) { {/* Scrollable page body */}
-
+
{children}
diff --git a/src/app/dashboard/leaderboard/page.tsx b/src/app/dashboard/leaderboard/page.tsx index 91982d3..fa8c3ca 100644 --- a/src/app/dashboard/leaderboard/page.tsx +++ b/src/app/dashboard/leaderboard/page.tsx @@ -47,7 +47,7 @@ export default function LeaderboardPage() { return (
-
+

@@ -82,7 +82,7 @@ export default function LeaderboardPage() {

-
+
RANK diff --git a/src/app/dashboard/materials/page.tsx b/src/app/dashboard/materials/page.tsx index b223882..6ffbf60 100644 --- a/src/app/dashboard/materials/page.tsx +++ b/src/app/dashboard/materials/page.tsx @@ -33,7 +33,7 @@ export default function MaterialsPage() { return (
-
+

@@ -47,7 +47,7 @@ export default function MaterialsPage() {

-
+
{folders.map((folder, i) => ( @@ -59,7 +59,7 @@ export default function MaterialsPage() { ))}
-
+

Recently Accessed Study Notes Click any PDF to launch fullscreen reader diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index fdf58ee..ef45558 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -137,7 +137,7 @@ export default function DashboardPage() {
{/* Page Header */} -
+

@@ -174,7 +174,7 @@ export default function DashboardPage() {

{/* KPI Stat Cards */} -
+
{/* Today's Score */} @@ -240,7 +240,7 @@ export default function DashboardPage() {
{/* Tests & DPPs Grid */} -
+
{/* Dynamic DPP Modules */}
@@ -347,7 +347,7 @@ export default function DashboardPage() {
{/* AI Intelligence Grid */} -
+
diff --git a/src/app/dashboard/progress/page.tsx b/src/app/dashboard/progress/page.tsx index 9dd3571..29fb465 100644 --- a/src/app/dashboard/progress/page.tsx +++ b/src/app/dashboard/progress/page.tsx @@ -257,7 +257,7 @@ export default function ProgressTrackerPage() { if (!hasAccessTo("chapter-wise-progress-tracking") && !isDemo) { return (
-
+

@@ -270,7 +270,7 @@ export default function ProgressTrackerPage() {

-
+
@@ -299,7 +299,7 @@ export default function ProgressTrackerPage() { return (
-
+

@@ -313,7 +313,7 @@ export default function ProgressTrackerPage() {

-
= 4 ? 'lg:grid-cols-4' : 'md:grid-cols-3'} gap-6 mb-8 animate-section animate-section-2`}> +
= 4 ? 'lg:grid-cols-4' : 'md:grid-cols-3'} gap-6 mb-8`}> {subjects.map((sub, i) => ( @@ -327,7 +327,7 @@ export default function ProgressTrackerPage() { ))}
-
+
{subjects.map((subject, subIndex) => ( diff --git a/src/app/dashboard/rank-predictor/page.tsx b/src/app/dashboard/rank-predictor/page.tsx index cae95fc..fd194e9 100644 --- a/src/app/dashboard/rank-predictor/page.tsx +++ b/src/app/dashboard/rank-predictor/page.tsx @@ -75,7 +75,7 @@ export default function RankPredictorPage() {
{/* Header */} -
+
AI Neural Prediction Engine
@@ -133,7 +133,7 @@ export default function RankPredictorPage() {
{/* Main Grid */} -
+
{/* Left Interactive Simulator */}
diff --git a/src/app/dashboard/settings/page.tsx b/src/app/dashboard/settings/page.tsx index e2707fe..d6b3a8d 100644 --- a/src/app/dashboard/settings/page.tsx +++ b/src/app/dashboard/settings/page.tsx @@ -108,7 +108,7 @@ export default function SettingsPage() { return (
-
+

@@ -122,7 +122,7 @@ export default function SettingsPage() {

-
+
{/* Profile photo upload tile */} diff --git a/src/app/dashboard/settings/password/page.tsx b/src/app/dashboard/settings/password/page.tsx index 5c01ac4..6cc66ae 100644 --- a/src/app/dashboard/settings/password/page.tsx +++ b/src/app/dashboard/settings/password/page.tsx @@ -46,7 +46,7 @@ export default function PasswordPage() { return (
-
+

@@ -60,7 +60,7 @@ export default function PasswordPage() {

- + Change Password Update your account password diff --git a/src/app/dashboard/streaks/page.tsx b/src/app/dashboard/streaks/page.tsx index 86879d8..b026002 100644 --- a/src/app/dashboard/streaks/page.tsx +++ b/src/app/dashboard/streaks/page.tsx @@ -47,7 +47,7 @@ export default function StreaksPage() { return (
-
+

@@ -61,7 +61,7 @@ export default function StreaksPage() {

-
+
@@ -106,7 +106,7 @@ export default function StreaksPage() {
-
+

Streak Rewards

{rewards.map((reward, i) => ( diff --git a/src/app/globals.css b/src/app/globals.css index fa20cba..da6ff3f 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -121,21 +121,20 @@ body { text-wrap: balance; } - /* ─── Uniform staggered subtle page & section entry animations ─── */ - .animate-page-enter { - animation: pageFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both; + /* ─── Intro/opening animations removed for rock-solid instant page display ─── */ + .animate-page-enter, + .animate-section, + .animate-section-1, + .animate-section-2, + .animate-section-3, + .animate-section-4, + .animate-section-5, + .animate-section-6 { + animation: none !important; + opacity: 1 !important; + transform: none !important; } - .animate-section { - animation: sectionFadeUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both; - } - .animate-section-1 { animation-delay: 0ms; } - .animate-section-2 { animation-delay: 50ms; } - .animate-section-3 { animation-delay: 100ms; } - .animate-section-4 { animation-delay: 150ms; } - .animate-section-5 { animation-delay: 200ms; } - .animate-section-6 { animation-delay: 250ms; } - .bg-grid { @@ -191,23 +190,3 @@ body { background: var(--muted-foreground); } -@keyframes pageFadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -@keyframes sectionFadeUp { - from { - opacity: 0; - transform: translateY(8px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - diff --git a/src/components/PremiumGate.tsx b/src/components/PremiumGate.tsx index 7e98faa..11e45b7 100644 --- a/src/components/PremiumGate.tsx +++ b/src/components/PremiumGate.tsx @@ -14,7 +14,7 @@ export function PremiumGate({ featureKey, children }: PremiumGateProps) { const { hasAccessTo, loading, user } = useActiveUser(); // Allow children to render immediately without a blocking center spinner - // so that page entry animations (animate-section) execute smoothly on route transition. + // so that pages mount instantly on route transition. if (loading || !user) { return <>{children}; }