diff --git a/src/components/auth/SignupDialog.tsx b/src/components/auth/SignupDialog.tsx index e224d85..c2cd7ff 100644 --- a/src/components/auth/SignupDialog.tsx +++ b/src/components/auth/SignupDialog.tsx @@ -152,14 +152,26 @@ const SignupDialog: React.FC = ({ isOpen, onClose, onComplete }; const finishSignup = async (skipProfile = false) => { + // A display name is mandatory (changeable later). Guard here too so the step + // can't be completed without one, even via keyboard/Enter. + const trimmedName = profileData.name.trim(); + if (!skipProfile && !trimmedName) { + toast({ + title: 'Display name required', + description: 'Pick a display name so other skaters know who you are. You can change it anytime.', + variant: 'destructive', + }); + return; + } + // Mark signup completion time for fallback welcome modal localStorage.setItem('signup_completed', Date.now().toString()); try { // Publish profile if user provided information - if (!skipProfile && (profileData.name || profileData.about || profileData.picture)) { + if (!skipProfile && (trimmedName || profileData.about || profileData.picture)) { const metadata: Record = {}; - if (profileData.name) metadata.name = profileData.name; + if (trimmedName) metadata.name = trimmedName; if (profileData.about) metadata.about = profileData.about; if (profileData.picture) metadata.picture = profileData.picture; @@ -365,11 +377,11 @@ const SignupDialog: React.FC = ({ isOpen, onClose, onComplete

- You're in! 🛹 Add a name so skaters know who you are + You're in! 🛹 Pick a display name so skaters know who you are

- This is optional — you can skip it and fill it in later. + You can change it anytime later. Bio and avatar are optional.

@@ -390,16 +402,22 @@ const SignupDialog: React.FC = ({ isOpen, onClose, onComplete
setProfileData(prev => ({ ...prev, name: e.target.value }))} - placeholder='Your name' + placeholder='e.g. Tony, gnarlyGrind, or your crew name' className='rounded-lg' + maxLength={64} + required + aria-required='true' disabled={isPublishing} /> +

+ Required — how you'll show up across SkateSpots. Change it anytime. +

@@ -456,12 +474,12 @@ const SignupDialog: React.FC = ({ isOpen, onClose, onComplete
- {/* Action buttons */} + {/* Action button — a display name is required to continue. */}
- + {!profileData.name.trim() && !isPublishing && ( +

+ Add a display name to continue. +

+ )}
)}