UI, layout, and target exam logic updates
This commit is contained in:
@@ -133,22 +133,15 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
active={pathname.startsWith("/dashboard/cbt")}
|
||||
isLocked={!hasAccessTo("weekly-test-series")}
|
||||
/>
|
||||
<NavItem
|
||||
{/* <NavItem
|
||||
section="pro"
|
||||
href="/dashboard/materials"
|
||||
icon={<BookOpen size={17} />}
|
||||
label="Quick Notes"
|
||||
active={pathname.startsWith("/dashboard/materials")}
|
||||
isLocked={!hasAccessTo("detailed-performance-analytics")}
|
||||
/>
|
||||
<NavItem
|
||||
section="pro"
|
||||
href="/dashboard/analytics"
|
||||
icon={<LineChart size={17} />}
|
||||
label="Performance Analytics"
|
||||
active={pathname.startsWith("/dashboard/analytics")}
|
||||
isLocked={!hasAccessTo("detailed-performance-analytics")}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
<NavItem
|
||||
section="pro"
|
||||
href="/dashboard/community"
|
||||
@@ -170,6 +163,14 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<NavItem
|
||||
section="ai"
|
||||
href="/dashboard/analytics"
|
||||
icon={<LineChart size={17} />}
|
||||
label="Performance Analytics"
|
||||
active={pathname.startsWith("/dashboard/analytics")}
|
||||
isLocked={!hasAccessTo("detailed-performance-analytics")}
|
||||
/>
|
||||
<NavItem
|
||||
section="ai"
|
||||
href="/dashboard/ai-coach/tutor"
|
||||
@@ -266,15 +267,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
<div className="px-4 py-3 border-b border-border bg-secondary/30">
|
||||
<p className="text-sm font-bold text-foreground truncate">{cleanDisplayName(user.name)}</p>
|
||||
<p className="text-xs text-muted-foreground truncate">{user.email || user.phone}</p>
|
||||
{/* Trial info in dropdown */}
|
||||
{trialInfo.isTrialActive && (
|
||||
<div className="mt-1.5 flex items-center gap-1.5">
|
||||
<span className="inline-flex items-center gap-1 text-[10px] font-bold px-2 py-0.5 rounded-full bg-primary/10 text-primary border border-primary/20">
|
||||
Day {trialInfo.trialDayNumber} of {trialInfo.trialTotalDays} Trial
|
||||
</span>
|
||||
<span className="text-[10px] text-muted-foreground">{trialInfo.trialDaysRemaining}d left</span>
|
||||
</div>
|
||||
)}
|
||||
{/* Trial info in dropdown removed */}
|
||||
</div>
|
||||
<div className="p-1.5">
|
||||
<Link href="/dashboard/settings" className="flex items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-secondary rounded-lg transition-colors">
|
||||
@@ -310,13 +303,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-bold leading-none truncate">{user ? cleanDisplayName(user.name).split(" ")[0] : "Loading..."}</p>
|
||||
<div className="mt-1">
|
||||
{trialInfo.isTrialActive ? (
|
||||
<span className="inline-flex items-center text-[10px] font-bold text-primary">
|
||||
Day {trialInfo.trialDayNumber}/{trialInfo.trialTotalDays} Trial
|
||||
</span>
|
||||
) : (
|
||||
<TierBadge tier={user ? (user.tier === "Al_Coach" ? "AI Coach" : user.tier) : "Free"} />
|
||||
)}
|
||||
<TierBadge tier={user ? (user.tier === "Al_Coach" ? "AI Coach" : user.tier) : "Free"} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -339,13 +326,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
{targetExamLabel} Target
|
||||
</Badge>
|
||||
)}
|
||||
{/* Trial countdown badge — shown to trial users in top header */}
|
||||
{trialInfo.isTrialActive && (
|
||||
<Badge variant="outline" className="bg-primary/10 text-primary border-primary/20 font-bold px-2.5 py-0.5 hidden md:inline-flex gap-1">
|
||||
<span className="size-1.5 rounded-full bg-primary animate-pulse"></span>
|
||||
Day {trialInfo.trialDayNumber}/{trialInfo.trialTotalDays} Trial · {trialInfo.trialDaysRemaining}d left
|
||||
</Badge>
|
||||
)}
|
||||
{/* Trial countdown badge removed from top header */}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
Reference in New Issue
Block a user