Default visiblity to all

feat/public-profile
Kamran Ahmed 2 months ago
parent 29bce749bb
commit eb3a1e12db
  1. 6
      src/components/Dashboard/PersonalDashboard.tsx
  2. 8
      src/components/UpdateProfile/ProfileUsername.tsx
  3. 3
      src/components/UpdateProfile/UpdatePublicProfileForm.tsx

@ -268,7 +268,11 @@ export function PersonalDashboard(props: PersonalDashboardProps) {
externalLinkHref: '/account/update-profile', externalLinkHref: '/account/update-profile',
externalLinkText: 'Edit', externalLinkText: 'Edit',
})} })}
className={username ? 'border-dashed' : ''} className={
!username
? 'border-dashed border-gray-500 bg-gray-100 hover:border-gray-500 hover:bg-gray-200'
: ''
}
/> />
<DashboardCard <DashboardCard

@ -87,15 +87,13 @@ export function ProfileUsername(props: ProfileUsernameProps) {
{currentUsername !== username && username && isUnique && ( {currentUsername !== username && username && isUnique && (
<span className="text-xs text-green-600"> <span className="text-xs text-green-600">
URL after update{' '} URL after update{' '}
<a <span
href={`${import.meta.env.DEV ? 'http://localhost:3000' : 'https://roadmap.sh'}/u/${username}`}
target="_blank"
className={ className={
'ml-0.5 rounded-md border border-purple-500 px-1.5 py-0.5 text-xs font-medium text-purple-700 transition-colors hover:bg-purple-500 hover:text-white' 'ml-0.5 rounded-md border border-purple-500 px-1.5 py-0.5 text-xs font-medium text-purple-700 transition-colors'
} }
> >
roadmap.sh/u/{username} roadmap.sh/u/{username}
</a> </span>
</span> </span>
)} )}
</span> </span>

@ -51,8 +51,7 @@ export function UpdatePublicProfileForm() {
const [headline, setHeadline] = useState(''); const [headline, setHeadline] = useState('');
const [username, setUsername] = useState(''); const [username, setUsername] = useState('');
const [email, setEmail] = useState(''); const [email, setEmail] = useState('');
const [roadmapVisibility, setRoadmapVisibility] = const [roadmapVisibility, setRoadmapVisibility] = useState<AllowedRoadmapVisibility>('all');
useState<AllowedRoadmapVisibility>('all');
const [customRoadmapVisibility, setCustomRoadmapVisibility] = const [customRoadmapVisibility, setCustomRoadmapVisibility] =
useState<AllowedCustomRoadmapVisibility>('all'); useState<AllowedCustomRoadmapVisibility>('all');
const [roadmaps, setRoadmaps] = useState<string[]>([]); const [roadmaps, setRoadmaps] = useState<string[]>([]);

Loading…
Cancel
Save