diff --git a/components/companyCard.jsx b/components/companyCard.jsx new file mode 100644 index 0000000..95732cd --- /dev/null +++ b/components/companyCard.jsx @@ -0,0 +1,25 @@ +import Image from "next/image"; +import Link from "next/link"; +export default function CompanyCard({ json, basePath }) { + const style = "relative " + "h-28 w-28"; // larger: "h-48 w-48" + return ( + + {json.name} + + ); +} diff --git a/components/companySection.jsx b/components/companySection.jsx new file mode 100644 index 0000000..6fab3ab --- /dev/null +++ b/components/companySection.jsx @@ -0,0 +1,19 @@ +import CompanyCard from "./companyCard"; + +export default function CompanySection({ group, basePath }) { + return ( +
+
+ {group.companies.map((company, index) => ( + + ))} +
+
+ ); +} diff --git a/config/companies.json b/config/companies.json new file mode 100644 index 0000000..1a7e196 --- /dev/null +++ b/config/companies.json @@ -0,0 +1,16 @@ +[ + { + "companies": [ + { + "name": "Rocket Companies", + "link": "https://www.myrocketcareer.com/", + "image": "rocket.png" + }, + { + "name": "Wolverine Trading", + "link": "https://www.wolve.com/", + "image": "wolve.png" + } + ] + } +] diff --git a/pages/index.jsx b/pages/index.jsx index 70e5b8b..ffb4127 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -4,6 +4,7 @@ import Hero from "@/components/hero"; import Icon from "@/components/icon"; import Layout from "@/components/layout"; import SponsorSection from "@/components/sponsorSection"; +import CompanySection from "@/components/companySection"; import Timeline from "@/components/timeline"; import Wave from "@/components/wave"; import Wave180 from "@/components/wave180"; @@ -14,7 +15,7 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { useState } from "react"; -export default function Home({ sponsors, projects, timeline, communityImages }) { +export default function Home({ companies, sponsors, projects, timeline, communityImages }) { sponsors[0].tier = "MDST is made possible by our sponsors"; const router = useRouter(); const basePath = router.basePath; @@ -127,6 +128,12 @@ export default function Home({ sponsors, projects, timeline, communityImages }) +
+

+ Companies We Work With: +

+ +
); } @@ -218,9 +225,10 @@ function Carousel({ projects, basePath }) { export async function getStaticProps() { const sponsors = loadStaticData("sponsors.json"); + const companies = loadStaticData("companies.json"); const projects = loadStaticData("homepage.json"); const timeline = loadStaticData("timeline.json"); const communityImages = loadStaticData("communityImages.json"); - return { props: { sponsors, projects, timeline, communityImages } }; + return { props: { companies, sponsors, projects, timeline, communityImages } }; }