Update AI coach calibration, fix streak animation speed, add dashboard features and target filtering
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"use client"
|
||||
"use client"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
@@ -72,6 +72,10 @@ export default function DPPPage() {
|
||||
const scheduledDate = new Date(dpp.scheduled_date).toISOString().split('T')[0];
|
||||
if (scheduledDate !== dateFilter) return false;
|
||||
}
|
||||
const isNeet = user?.target_exam === "NEET";
|
||||
const title = dpp.title.toLowerCase();
|
||||
if (isNeet && (title.includes("math") || title.includes("mth"))) return false;
|
||||
if (!isNeet && title.includes("bio")) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
@@ -398,6 +398,14 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Free Trial Banner */}
|
||||
{trialInfo.isTrialActive && (
|
||||
<div className="bg-primary text-primary-foreground px-4 py-2.5 text-center text-sm font-bold flex justify-center items-center gap-2 shadow-sm shrink-0 z-30">
|
||||
<span className="size-2 rounded-full bg-primary-foreground animate-pulse"></span>
|
||||
15 Days Free Trial — Day {trialInfo.trialDayNumber}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Scrollable page body */}
|
||||
<main className="flex-1 overflow-y-auto relative bg-background/50">
|
||||
{children}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client"
|
||||
"use client"
|
||||
|
||||
import { useState, useEffect } from "react"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
@@ -77,7 +77,7 @@ export default function LeaderboardPage() {
|
||||
onClick={() => setActiveTab('school')}
|
||||
className={`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${activeTab === 'school' ? 'bg-background shadow-sm border border-border text-foreground' : 'text-muted-foreground hover:text-foreground'}`}
|
||||
>
|
||||
School
|
||||
Institute
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client"
|
||||
"use client"
|
||||
|
||||
import { useRef, useState, useEffect } from "react"
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
@@ -56,6 +56,7 @@ export default function DashboardPage() {
|
||||
}
|
||||
|
||||
const isNew = userStats ? userStats.is_new_user : true
|
||||
const isNeet = user?.target_exam === "NEET"
|
||||
|
||||
return (
|
||||
<div className="p-8 max-w-7xl mx-auto space-y-10 animate-in fade-in duration-500 slide-in-from-bottom-4">
|
||||
@@ -188,7 +189,9 @@ export default function DashboardPage() {
|
||||
<BrainCircuit size={20} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-medium text-base group-hover:text-primary transition-colors">Biology: Human Physiology</h3>
|
||||
<h3 className="font-medium text-base group-hover:text-primary transition-colors">
|
||||
{isNeet ? "Biology: Human Physiology" : "Maths: Integral Calculus"}
|
||||
</h3>
|
||||
<p className="text-sm text-muted-foreground mt-0.5">30 Questions • Medium Priority</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -205,7 +208,9 @@ export default function DashboardPage() {
|
||||
<Lock size={20} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-medium text-base text-muted-foreground">Biology: Human Physiology</h3>
|
||||
<h3 className="font-medium text-base text-muted-foreground">
|
||||
{isNeet ? "Biology: Human Physiology" : "Maths: Integral Calculus"}
|
||||
</h3>
|
||||
<p className="text-sm text-muted-foreground mt-0.5 flex items-center gap-1"><Lock size={12}/> Pro Feature</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user