diff --git a/src/components/ProgressModal.tsx b/src/components/ProgressModal.tsx index 44f2970556..2a8bdb8172 100644 --- a/src/components/ProgressModal.tsx +++ b/src/components/ProgressModal.tsx @@ -5,6 +5,7 @@ import { Button } from '@site/src/ui/design-system/src/lib/Components/Button'; import { useProgress } from '../hooks/use-progress'; import { submitNoopChallenge } from '../utils/gold-star'; import ChallengeModal from './ChallengeModal'; +import { useProfile } from '../hooks/use-profile'; interface ProgressModalProps { isOpen: boolean; @@ -17,6 +18,7 @@ const ProgressModal: React.FC = ({ onClose, onOpenProfileModal, }) => { + const { profile, isLoading: isProfileLoading } = useProfile(); const { profileItems, challengeItems } = useProgress(); const [challengeModalOpen, setChallengeModalOpen] = useState(false); @@ -34,8 +36,8 @@ const ProgressModal: React.FC = ({

- Complete the steps below to unlock rewards and challenges. Keep track of your progress and stay on track - with your goals! + Complete the steps below to unlock rewards and challenges. Keep + track of your progress and stay on track with your goals!

{/* Profile Section */} @@ -62,8 +64,11 @@ const ProgressModal: React.FC = ({ variant="primary" className="w-full max-w-md" onClick={openChallengeModal} + disabled={!profile} > - View First Challenge to Complete + {profile || isProfileLoading + ? 'View First Challenge to Complete' + : 'Create Profile to View Challenge'}