Skip to content

Commit bd7e8ec

Browse files
Merge pull request #146 from codersforcauses/issue-133-Change_footer_game_development_links
Issue 133 change footer game development links
2 parents d9c4c08 + 7d103b8 commit bd7e8ec

3 files changed

Lines changed: 23 additions & 36 deletions

File tree

client/src/components/main/Footer.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff 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

client/src/components/ui/SocialIconButton.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,19 @@ import { SocialIcon } from "react-social-icons";
44

55
import { 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
97
export 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
);

client/src/gamedev-metadata.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
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
}

0 commit comments

Comments
 (0)