From 1ee6f0e12518f5d41150a727d12466a67337709e Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Thu, 27 Jun 2024 16:52:03 +0600 Subject: [PATCH] feat: add daily dev link in profile (#5948) --- src/api/user.ts | 1 + src/components/DailyDevIcon.tsx | 15 ++++++++++++ .../UpdateProfile/UpdatePublicProfileForm.tsx | 23 ++++++++++++++++++- .../UserPublicProfileHeader.tsx | 16 ++++++++++--- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 src/components/DailyDevIcon.tsx diff --git a/src/api/user.ts b/src/api/user.ts index e139e8e2a..819c68dbd 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -44,6 +44,7 @@ export interface UserDocument { github?: string; linkedin?: string; twitter?: string; + dailydev?: string; website?: string; }; username?: string; diff --git a/src/components/DailyDevIcon.tsx b/src/components/DailyDevIcon.tsx new file mode 100644 index 000000000..22122dec6 --- /dev/null +++ b/src/components/DailyDevIcon.tsx @@ -0,0 +1,15 @@ +import type { SVGProps } from 'react'; + +export function DailyDevIcon(props: SVGProps) { + return ( + + + + + + + ); +} diff --git a/src/components/UpdateProfile/UpdatePublicProfileForm.tsx b/src/components/UpdateProfile/UpdatePublicProfileForm.tsx index 155c23775..9162082b5 100644 --- a/src/components/UpdateProfile/UpdatePublicProfileForm.tsx +++ b/src/components/UpdateProfile/UpdatePublicProfileForm.tsx @@ -9,7 +9,8 @@ import type { } from '../../api/user'; import { SelectionButton } from '../RoadCard/SelectionButton'; import { - ArrowUpRight, Check, + ArrowUpRight, + Check, CheckCircle, Copy, Eye, @@ -64,6 +65,7 @@ export function UpdatePublicProfileForm() { const [github, setGithub] = useState(''); const [twitter, setTwitter] = useState(''); const [linkedin, setLinkedin] = useState(''); + const [dailydev, setDailydev] = useState(''); const [website, setWebsite] = useState(''); const [profileRoadmaps, setProfileRoadmaps] = useState([]); @@ -94,6 +96,7 @@ export function UpdatePublicProfileForm() { website, name, email, + dailydev, }, ); @@ -141,6 +144,7 @@ export function UpdatePublicProfileForm() { setGithub(links?.github || ''); setTwitter(links?.twitter || ''); setLinkedin(links?.linkedin || ''); + setDailydev(links?.dailydev || ''); setWebsite(links?.website || ''); setProfileVisibility(defaultProfileVisibility || 'public'); setHeadline(publicConfig?.headline || ''); @@ -528,6 +532,23 @@ export function UpdatePublicProfileForm() { onChange={(e) => setLinkedin((e.target as HTMLInputElement).value)} /> +
+ + setDailydev((e.target as HTMLInputElement).value)} + /> +