File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ import api from "@/lib/api";
66type Contributor = {
77 name : string ;
88 role : string ;
9+ social_media ?: {
10+ socialMediaName : string ;
11+ link : string ;
12+ socialMediaUserName : string ;
13+ } [ ] ;
914} ;
1015
1116type ApiShowcaseGame = {
Original file line number Diff line number Diff line change @@ -131,22 +131,17 @@ export default function HomePage() {
131131 >
132132 - { contributor . role }
133133 </ span >
134- { /* Social icons placeholder */ }
135- { /* TODO: Add actual links */ }
134+ { /* Social icons from API */ }
136135 < span className = "flex gap-2 text-primary" >
137- { /* Social icons using react-social-icons */ }
138- < SocialIcon
139- url = "https://facebook.com/"
140- style = { { height : 24 , width : 24 } }
141- />
142- < SocialIcon
143- url = "https://instagram.com/"
144- style = { { height : 24 , width : 24 } }
145- />
146- < SocialIcon
147- url = "https://github.com/"
148- style = { { height : 24 , width : 24 } }
149- />
136+ { Array . isArray ( contributor . social_media ) &&
137+ contributor . social_media . map ( ( sm ) => (
138+ < SocialIcon
139+ key = { sm . link }
140+ url = { sm . link }
141+ style = { { height : 24 , width : 24 } }
142+ title = { sm . socialMediaUserName }
143+ />
144+ ) ) }
150145 </ span >
151146 </ li >
152147 ) ) }
You can’t perform that action at this time.
0 commit comments