File tree Expand file tree Collapse file tree 4 files changed +15
-12
lines changed
[username]/(profile-page)/_components Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ const ProfilePageAside: React.FC<ProfilePageAsideProps> = ({ profile }) => {
134134 </ Link >
135135 ) }
136136
137- { profile ?. social_links ?. stackOverflow && (
137+ { /* { profile?.social_links?.stackOverflow && (
138138 <Link
139139 href={profile?.social_links?.stackOverflow}
140140 target="_blank"
@@ -152,7 +152,7 @@ const ProfilePageAside: React.FC<ProfilePageAsideProps> = ({ profile }) => {
152152 >
153153 <Medium size={30} />
154154 </Link>
155- ) }
155+ )} */ }
156156
157157 { profile ?. social_links ?. linkedin && (
158158 < a
@@ -164,9 +164,9 @@ const ProfilePageAside: React.FC<ProfilePageAsideProps> = ({ profile }) => {
164164 </ a >
165165 ) }
166166
167- { profile ?. social_links ?. twitter && (
167+ { profile ?. social_links ?. x && (
168168 < Link
169- href = { profile ?. social_links ?. twitter }
169+ href = { profile ?. social_links ?. x }
170170 target = "_blank"
171171 className = " text-forground-muted"
172172 >
@@ -184,7 +184,7 @@ const ProfilePageAside: React.FC<ProfilePageAsideProps> = ({ profile }) => {
184184 </ Link >
185185 ) }
186186
187- { profile ?. social_links ?. behance && (
187+ { /* { profile?.social_links?.behance && (
188188 <a
189189 href={profile?.social_links?.behance}
190190 target="_blank"
@@ -212,7 +212,7 @@ const ProfilePageAside: React.FC<ProfilePageAsideProps> = ({ profile }) => {
212212 >
213213 <Twitch size={30} />
214214 </Link>
215- ) }
215+ )} */ }
216216
217217 { profile ?. social_links ?. youtube && (
218218 < a
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ const SocialMediaForm: React.FC<Props> = ({ user }) => {
4242 mode : "all" ,
4343 defaultValues : {
4444 social_links : {
45- github : user . social_links . github ,
46- x : user . social_links . x ,
47- linkedin : user . social_links . linkedin ,
48- facebook : user . social_links . facebook ,
49- instagram : user . social_links . instagram ,
50- youtube : user . social_links . youtube ,
45+ github : user ? .social_links ? .github ,
46+ x : user ? .social_links ? .x ,
47+ linkedin : user ? .social_links ? .linkedin ,
48+ facebook : user ? .social_links ? .facebook ,
49+ instagram : user ? .social_links ? .instagram ,
50+ youtube : user ? .social_links ? .youtube ,
5151 } ,
5252 } ,
5353 resolver : zodResolver ( UserActionInput . updateMyProfileInput ) ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const SettingsPage = async () => {
1212
1313 return (
1414 < div >
15+ < pre > { JSON . stringify ( current_user , null , 2 ) } </ pre >
1516 < Tabs defaultValue = "general" >
1617 < TabsList >
1718 < TabsTrigger value = "general" > { _t ( "General" ) } </ TabsTrigger >
Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ export async function updateMyProfile(
9191
9292 const input = await UserActionInput . updateMyProfileInput . parseAsync ( _input ) ;
9393
94+ console . log ( input . social_links ) ;
95+
9496 const updatedUser = await persistenceRepository . user . update ( {
9597 where : eq ( "id" , sessionUser ! ) ,
9698 data : {
You can’t perform that action at this time.
0 commit comments