Skip to content

Commit c0736b6

Browse files
Taiga ChangTaiga Chang
authored andcommitted
[task] list sponsors of codewithaloha #59
1 parent 4ee0447 commit c0736b6

7 files changed

Lines changed: 91 additions & 0 deletions

File tree

src/components/Projects.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import projectsImg from "../images/projects.png";
1010
// import hawaiiZoningAtlasImg from "../images/HawaiiZoningAtlas.png";
1111
// import hierrImg from "../images/HIERR.png";
1212
import { getCurrentProjects } from "@/data/webData";
13+
import Sponsors from "./Sponsors";
1314

1415
export const ProjectCard = ({
1516
id,
@@ -176,6 +177,7 @@ const Projects = () => {
176177
</div>
177178
<HistoricalProjects />
178179
<Clients />
180+
<Sponsors />
179181
</section>
180182
);
181183
};

src/components/Sponsors.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React, { useState, useEffect } from "react";
2+
import Image from "next/image";
3+
import { getSponsors } from "@/data/webData";
4+
5+
const Sponsers = () => {
6+
const [sponsors, setSponsors] = useState([]);
7+
8+
useEffect(() => {
9+
setSponsors(getSponsors());
10+
}, []);
11+
12+
const handleSponsorImageClick = (url) => {
13+
window.open(url, "_blank");
14+
};
15+
16+
return (
17+
<div className="pt-20">
18+
<h2 className="text-4xl xl:text-7xl pt-10 drop-shadow-xl text-center py-20">
19+
Sponsors
20+
</h2>
21+
22+
<div className="flex items-center justify-center pb-40">
23+
{sponsors.map((sponsor) => (
24+
<Image
25+
onClick={() => handleSponsorImageClick(sponsor.url)}
26+
key={sponsor.id}
27+
alt={sponsor.alt}
28+
src={sponsor.src}
29+
width={sponsor.width}
30+
height={sponsor.height}
31+
className={sponsor.className}
32+
style={{ cursor: "pointer" }}
33+
/>
34+
))}
35+
</div>
36+
</div>
37+
);
38+
};
39+
40+
export default Sponsers;

src/data/webData.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ import experienceImg from "../images/experience.png";
1818
import oneImg from "../images/one.png";
1919
import twoImg from "../images/two.png";
2020
import threeImg from "../images/three.png";
21+
import sponsor1Img from "../images/sponsor1.png";
22+
import sponsor2Img from "../images/sponsor2.png";
23+
import sponsor3Img from "../images/sponsor3.png";
24+
import sponsor4Img from "../images/sponsor4.png";
2125

2226
const data = {
2327
currentProjects: [
@@ -214,6 +218,48 @@ const data = {
214218
text: "During each meetup, we facilitate breakout rooms tailored to our projects for targeted discussion and planning. Together in these rooms, we drive innovation and progress, contributing to the growth and betterment of our community. Your insights can make a real difference – let's achieve greatness together!",
215219
},
216220
],
221+
sponsors: [
222+
{
223+
id: 1,
224+
alt: "HTDC",
225+
src: sponsor1Img,
226+
width: 500,
227+
height: 500,
228+
className: "mx-8 h-full w-1/6 lg:w-1/8 ",
229+
hasWebsite: true,
230+
url: "https://www.htdc.org/",
231+
},
232+
{
233+
id: 2,
234+
alt: "Box Jelly",
235+
src: sponsor2Img,
236+
width: 500,
237+
height: 500,
238+
className: "mx-8 h-full w-1/6 lg:w-1/8 ",
239+
hasWebsite: true,
240+
url: "https://www.theboxjelly.com/",
241+
},
242+
{
243+
id: 3,
244+
alt: "Entrepreneur Sandbox",
245+
src: sponsor3Img,
246+
width: 500,
247+
height: 500,
248+
className: "mx-8 h-full w-1/6 lg:w-1/8 ",
249+
hasWebsite: true,
250+
url: "https://sandboxhawaii.org/",
251+
},
252+
{
253+
id: 4,
254+
alt: "Hub Coworking Hawaii",
255+
src: sponsor4Img,
256+
width: 500,
257+
height: 500,
258+
className: "mx-8 h-full w-1/6 lg:w-1/8 ",
259+
hasWebsite: true,
260+
url: "https://hubcoworkinghi.com/",
261+
},
262+
],
217263
};
218264

219265
export const getCurrentProjects = () => {
@@ -237,3 +283,6 @@ export const getFocus = () => {
237283
export const getExpectations = () => {
238284
return structuredClone(data.expectations);
239285
};
286+
export const getSponsors = () => {
287+
return structuredClone(data.sponsors);
288+
};

src/images/sponsor1.png

30.1 KB
Loading

src/images/sponsor2.png

18.2 KB
Loading

src/images/sponsor3.png

26.7 KB
Loading

src/images/sponsor4.png

15.9 KB
Loading

0 commit comments

Comments
 (0)