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') ? ( - + ) : ( + + ) )}