diff --git a/web/src/components/ExecCard.tsx b/web/src/components/ExecCard.tsx deleted file mode 100644 index 18e1a61..0000000 --- a/web/src/components/ExecCard.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { ExecCardProps } from "../utils/FrontendTypes"; - -export default function ExecCard({ exec }: ExecCardProps) { - const { name, role, image } = exec; - - return ( - <> -
-
-

{role}

-

{name}

-
-
- - ); -} diff --git a/web/src/components/__tests__/ExecCard.test.tsx b/web/src/components/__tests__/ExecCard.test.tsx deleted file mode 100644 index 54dc268..0000000 --- a/web/src/components/__tests__/ExecCard.test.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import "@testing-library/jest-dom"; -import ExecCard from "../ExecCard"; -import execImage from "../../assets/placeholder.png" -import { ExecType } from "../../utils/FrontendTypes"; - -describe("Exec Card Component", () => { - const exec: ExecType = { - name: "Kai Hirafune", - role: "President", - image: execImage - }; - - it("Renders the ExecCard component with correct name and role", () => { - render(); - - expect(screen.getByText("Kai Hirafune")).toBeInTheDocument(); - expect(screen.getByText("President")).toBeInTheDocument(); - }); -}); diff --git a/web/src/pages/About.tsx b/web/src/pages/About.tsx index 7e7e63c..792bb37 100644 --- a/web/src/pages/About.tsx +++ b/web/src/pages/About.tsx @@ -1,82 +1,7 @@ -import icecream from "../assets/ice-cream.svg"; -import Navbar from "../components/Navbar"; -import Footer from "../components/Footer"; -import ExecCard from "../components/ExecCard"; -import { useState, useEffect } from "react"; -import axios from "axios"; -import { ExecType } from "../utils/FrontendTypes"; - export default function About() { - const [execs, setExecs] = useState([]); - - useEffect(() => { - async function fetchExecs() { - try { - const response = await axios.get("http://localhost:4000/api/execs/"); - setExecs(response.data); - } catch (error) { - console.error("Error fetching exec data", error); - } - } - fetchExecs(); - }, []); - - return ( - <> - - -
-
-
-

About Us

-

Welcome to the sweetest corner of the University of Auckland – the Dessert Society!

-
-

Whether you're a baker, connoisseur, or simply love sweets, you'll find a home with us.

-
-

- Explore classic recipes to innovative creations through our events, workshops, and gatherings. Join us on a delightful journey through - dessert-making, from perfect bakes to annual dessert crawls. -

-
-

No matter your skill level or background, everyone is welcome at the University of Auckland Dessert Society!

-
-
- -
- ice-cream photo -
-
- -
-

The Executive Team

-
- {execs.map((exec, index) => ( -
-

{exec.role}

-

{exec.name}

-
- ))} -
-
- -
-
- {execs.map((exec, index) => ( -
- -
- ))} -
-
-
-