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',
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

@ -87,15 +87,13 @@ export function ProfileUsername(props: ProfileUsernameProps) {
{currentUsername !== username && username && isUnique && (
<span className="text-xs text-green-600">
URL after update{' '}
<a
href={`${import.meta.env.DEV ? 'http://localhost:3000' : 'https://roadmap.sh'}/u/${username}`}
target="_blank"
<span
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}
</a>
</span>
</span>
)}
</span>

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

Loading…
Cancel
Save