Dashboard: hide setup banner when onboarding complete; add Profile Complete badge
cgen-54848c14b2fe468e8e636786b1989bf0
This commit is contained in:
parent
a6e4293f25
commit
d6fddbe169
1 changed files with 6 additions and 3 deletions
|
|
@ -51,7 +51,7 @@ import {
|
|||
|
||||
export default function Dashboard() {
|
||||
const navigate = useNavigate();
|
||||
const { user, profile, loading: authLoading, updateProfile } = useAuth();
|
||||
const { user, profile, loading: authLoading, updateProfile, profileComplete } = useAuth();
|
||||
const [displayName, setDisplayName] = useState("");
|
||||
const [locationInput, setLocationInput] = useState("");
|
||||
const [bio, setBio] = useState("");
|
||||
|
|
@ -273,8 +273,8 @@ export default function Dashboard() {
|
|||
);
|
||||
}
|
||||
|
||||
// Show profile setup if no profile exists, but allow dashboard to continue
|
||||
const showProfileSetup = !profile || profileCompletion < 80;
|
||||
// Hide setup banner once onboarding is complete
|
||||
const showProfileSetup = !profileComplete;
|
||||
|
||||
const statsDisplay = [
|
||||
{
|
||||
|
|
@ -490,6 +490,9 @@ export default function Dashboard() {
|
|||
>
|
||||
Level {profile?.level || 1}
|
||||
</Badge>
|
||||
{profileComplete && (
|
||||
<Badge className="mt-2 ml-2 bg-green-600 text-white border-green-500">Profile Complete</Badge>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* XP Progress */}
|
||||
|
|
|
|||
Loading…
Reference in a new issue