From 6599ff02c9df82176c932f33a44a67d163b23860 Mon Sep 17 00:00:00 2001 From: ectasy663 Date: Fri, 25 Sep 2026 16:03:25 +0530 Subject: [PATCH] Fix typescript error with PremiumGate --- src/app/dashboard/dpp/page.tsx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/app/dashboard/dpp/page.tsx b/src/app/dashboard/dpp/page.tsx index 19776bd..f370033 100644 --- a/src/app/dashboard/dpp/page.tsx +++ b/src/app/dashboard/dpp/page.tsx @@ -8,10 +8,9 @@ import { BrainCircuit, Play, CheckCircle2, Download, Filter, Lock, FileText, Eye import { useEffect, useState } from "react" import Link from "next/link" import { useActiveUser } from "@/hooks/useActiveUser" -import { PremiumGate } from "@/components/PremiumGate" export default function AIDailyPracticePage() { - const { user, userId } = useActiveUser() + const { user, userId, hasAccessTo } = useActiveUser() const [dpps, setDpps] = useState([]) const [attempts, setAttempts] = useState([]) const [loading, setLoading] = useState(true) @@ -214,34 +213,40 @@ export default function AIDailyPracticePage() { ) : isExpired && !isAttempted && !dpp.pdf_url ? ( ) : dpp.pdf_url ? ( - View PDF}> + hasAccessTo('PRO') ? ( - + ) : ( + + ) ) : isAttempted ? ( <> {!isExpired && ( - Retake}> + hasAccessTo('AI_COACH') ? ( - + ) : ( + + ) )} ) : ( - Launch Practice Test}> + hasAccessTo('AI_COACH') ? ( - + ) : ( + + ) )}