Skip to content

Commit a579b18

Browse files
committed
refactor data.ts
1 parent e06878d commit a579b18

File tree

5 files changed

+48
-52
lines changed

5 files changed

+48
-52
lines changed

frontend/public/data/socialInfos.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
export type socialInfo = {
2+
href: string;
3+
src: string;
4+
alt: string;
5+
};
6+
7+
export const socialLinks: socialInfo[] = [
8+
{
9+
href: 'https://bit.ly/CSESocDiscord',
10+
src: '/assets/discord_logo.svg',
11+
alt: 'Discord'
12+
},
13+
{
14+
href: 'https://www.facebook.com/csesoc/',
15+
src: '/assets/fb_logo.svg',
16+
alt: 'Facebook'
17+
},
18+
{
19+
href: 'https://twitter.com/csesoc?lang=en',
20+
src: '/assets/x_twitter_icon.svg',
21+
alt: 'X/Twitter'
22+
},
23+
{
24+
href: 'https://www.youtube.com/@CSESocUNSW',
25+
src: '/assets/youtube_logo.svg',
26+
alt: 'Youtube'
27+
},
28+
{
29+
href: 'https://www.instagram.com/csesoc_unsw/?hl=en',
30+
src: '/assets/instagram_logo.svg',
31+
alt: 'Instagram'
32+
},
33+
{
34+
href: 'https://www.tiktok.com/@csesoc?lang=en',
35+
src: '/assets/tiktok_logo.svg',
36+
alt: 'TikTok'
37+
},
38+
{
39+
href: 'https://www.linkedin.com/company/csesoc?originalSubdomain=au',
40+
src: '/assets/linkedin_logo.svg',
41+
alt: 'LinkedIn'
42+
}
43+
];

frontend/public/data/data.ts renamed to frontend/public/data/sponsorInfos.ts

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ export type sponsorInfo = {
55
description: string;
66
};
77

8-
export type socialInfo = {
9-
href: string;
10-
src: string;
11-
alt: string;
12-
};
13-
148
export const diamondLinks: sponsorInfo[] = [
159
{
1610
href: 'https://www.janestreet.com/',
@@ -23,7 +17,6 @@ export const diamondLinks: sponsorInfo[] = [
2317
svg: '/assets/tiktok_logo.svg',
2418
alt: 'Tiktok logo',
2519
description: "TikTok is a social media platform for creating, sharing and discovering short videos",
26-
2720
}
2821
];
2922

@@ -33,7 +26,6 @@ export const goldLinks: sponsorInfo[] = [
3326
svg: '/assets/atlassian_logo.svg',
3427
alt: 'Atlassian logo',
3528
description: "Atlassian Corporation is an Australian-American software company that develops products for software developers, and project managers among other groups",
36-
3729
},
3830
{
3931
href: 'https://www.citadel.com/',
@@ -131,42 +123,4 @@ export const silverLinks: sponsorInfo[] = [
131123
alt: 'Canva logo',
132124
description: "Canva is a free-to-use online graphic design tool. Use it to create social media posts, presentations, posters, videos, logos and more."
133125
}
134-
];
135-
136-
export const socialLinks: socialInfo[] = [
137-
{
138-
href: 'https://bit.ly/CSESocDiscord',
139-
src: '/assets/discord_logo.svg',
140-
alt: 'Discord'
141-
},
142-
{
143-
href: 'https://www.facebook.com/csesoc/',
144-
src: '/assets/fb_logo.svg',
145-
alt: 'Facebook'
146-
},
147-
{
148-
href: 'https://twitter.com/csesoc?lang=en',
149-
src: '/assets/x_twitter_icon.svg',
150-
alt: 'X/Twitter'
151-
},
152-
{
153-
href: 'https://www.youtube.com/@CSESocUNSW',
154-
src: '/assets/youtube_logo.svg',
155-
alt: 'Youtube'
156-
},
157-
{
158-
href: 'https://www.instagram.com/csesoc_unsw/?hl=en',
159-
src: '/assets/instagram_logo.svg',
160-
alt: 'Instagram'
161-
},
162-
{
163-
href: 'https://www.tiktok.com/@csesoc?lang=en',
164-
src: '/assets/tiktok_logo.svg',
165-
alt: 'TikTok'
166-
},
167-
{
168-
href: 'https://www.linkedin.com/company/csesoc?originalSubdomain=au',
169-
src: '/assets/linkedin_logo.svg',
170-
alt: 'LinkedIn'
171-
}
172-
];
126+
];

frontend/src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Image from 'next/image';
22
import Link from 'next/link';
3-
import { socialLinks } from '@/../public/data/data';
3+
import { socialLinks } from '@/../public/data/socialInfos';
44

55
const Footer = () => {
66
return (

frontend/src/components/Sponsors/SponsorLinks.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { useState } from 'react';
2-
import { diamondLinks, goldLinks, silverLinks, sponsorInfo } from '../../../public/data/data';
2+
import { diamondLinks, goldLinks, silverLinks, sponsorInfo } from '../../../public/data/sponsorInfos';
33
import SponsorModal from './SponsorModal';
44

5-
//import '/styles/sponsorLinks.module.css';
65
const logostyle = 'grow-on-hover cursor-pointer transform transition-transform duration-300 hover:scale-105';
76
const logodiv = 'block gap-y-8 h-14';
87
const background = 'rgba(57, 119, 248, 0.6)';
9-
// const outer = 'rounded-[4rem] w-[90rem] flex flex-col pl-14 py-14 gap-16';
108

119
function SponsorLinks() {
1210
const [showModal, setShowModal] = useState(false);

frontend/src/components/Sponsors/SponsorModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { sponsorInfo } from '../../../public/data/data';
1+
import { sponsorInfo } from '../../../public/data/sponsorInfos';
22
import {motion} from 'framer-motion'
3+
34
export default function SponsorModal(props: { sponsorInfo: sponsorInfo | null; setFalse: () => void }) {
45
if (props.sponsorInfo === null) {
56
return (

0 commit comments

Comments
 (0)