Skip to content

Commit 7d103b8

Browse files
Linting, formatting, simplification
1 parent a0d731a commit 7d103b8

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

client/src/components/main/Footer.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +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-
/>
134-
),
135-
)}
128+
{social_media.map((data) => (
129+
<SocialIconButton
130+
key={data.alt_text}
131+
url={data.url}
132+
altText={data.alt_text}
133+
/>
134+
))}
136135
</div>
137136
</div>
138137
<LinksList

client/src/components/ui/SocialIconButton.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ export type SocialMedia = {
1313
* Reusable social media icon button component
1414
* Handles hover animations and styling with Motion values for colors
1515
*/
16-
export default function SocialIconButton({
17-
url,
18-
altText,
19-
}: SocialMedia) {
16+
export default function SocialIconButton({ url, altText }: SocialMedia) {
2017
return (
2118
<motion.div
2219
className="group rounded-xl border border-white/10 bg-white/5 p-2.5"
@@ -41,11 +38,7 @@ export default function SocialIconButton({
4138
damping: 17,
4239
}}
4340
>
44-
<SocialIcon
45-
url={url}
46-
label={altText}
47-
className="h-5 w-5"
48-
/>
41+
<SocialIcon url={url} label={altText} className="h-5 w-5" />
4942
</motion.span>
5043
</motion.div>
5144
);

client/src/gamedev-metadata.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"social_media": {
3-
"facebook": {
2+
"social_media": [
3+
{
44
"url": "https://www.facebook.com/people/Game-Development-UWA/61576948012356/",
55
"alt_text": "Facebook"
66
},
7-
"discord": {
7+
{
88
"url": "https://discord.com/invite/JvnuVyMUff",
99
"alt_text": "Discord"
10-
},
11-
"instagram": {
10+
},
11+
{
1212
"url": "https://www.instagram.com/gamedevelopmentuwa",
1313
"alt_text": "Instagram"
1414
}
15-
}
15+
]
1616
}

0 commit comments

Comments
 (0)