File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,15 +125,13 @@ export default function Footer() {
125125 development club
126126 </ p >
127127 < div className = "flex gap-3 pt-2" >
128- { Object . entries ( social_media ) . map (
129- ( [ platform , data ] , index ) => (
130- < SocialIconButton
131- key = { index }
132- url = { data . url }
133- socialMediaName = { platform }
134- />
135- ) ,
136- ) }
128+ { social_media . map ( ( data ) => (
129+ < SocialIconButton
130+ key = { data . alt_text }
131+ url = { data . url }
132+ altText = { data . alt_text }
133+ />
134+ ) ) }
137135 </ div >
138136 </ div >
139137 < LinksList
Original file line number Diff line number Diff line change @@ -4,31 +4,19 @@ import { SocialIcon } from "react-social-icons";
44
55import { cssVarAsHSL } from "@/lib/utils" ;
66
7- // this way, we can use the fields from the social media
8- // table directly, in several other places throughout the site
97export type SocialMedia = {
108 url : string ;
11- socialMediaName : string ;
129 altText ?: string ;
13- // modify this type to support optional modification to the
14- // social media icons, like a one-size-fits-all styling property
15- // specifically for react-icons
16- // for now, lets keep it simple
1710} ;
1811
1912/**
2013 * Reusable social media icon button component
2114 * Handles hover animations and styling with Motion values for colors
2215 */
23- export default function SocialIconButton ( {
24- url,
25- socialMediaName,
26- altText,
27- } : SocialMedia ) {
16+ export default function SocialIconButton ( { url, altText } : SocialMedia ) {
2817 return (
2918 < motion . div
3019 className = "group rounded-xl border border-white/10 bg-white/5 p-2.5"
31- aria-label = { socialMediaName }
3220 whileHover = { {
3321 scale : 1.1 ,
3422 y : - 4 ,
@@ -50,12 +38,7 @@ export default function SocialIconButton({
5038 damping : 17 ,
5139 } }
5240 >
53- < SocialIcon
54- network = { socialMediaName }
55- url = { url }
56- label = { altText }
57- className = "h-5 w-5"
58- />
41+ < SocialIcon url = { url } label = { altText } className = "h-5 w-5" />
5942 </ motion . span >
6043 </ motion . div >
6144 ) ;
Original file line number Diff line number Diff line change 11{
2- "social_media" : {
3- "x" : { "url" : " twitter.com" , "alt_text" : " X (Twitter)" },
4- "discord" : { "url" : " discord.com" },
5- "github" : { "url" : " github.com" , "alt_text" : " GitHub" },
6- "youtube" : { "url" : " youtube.com" , "alt_text" : " YouTube" }
7- },
8- "art_showcase_description" : " Here are some of our favourite artworks from this years gamejams!" ,
9- "game_showcase_description" : " Here are some winning games of our recent game jams"
2+ "social_media" : [
3+ {
4+ "url" : " https://www.facebook.com/people/Game-Development-UWA/61576948012356/" ,
5+ "alt_text" : " Facebook"
6+ },
7+ {
8+ "url" : " https://discord.com/invite/JvnuVyMUff" ,
9+ "alt_text" : " Discord"
10+ },
11+ {
12+ "url" : " https://www.instagram.com/gamedevelopmentuwa" ,
13+ "alt_text" : " Instagram"
14+ }
15+ ]
1016}
You can’t perform that action at this time.
0 commit comments