diff --git a/frontend/src/app/about/ExecProfile.tsx b/frontend/src/app/about/ExecProfile.tsx index ef3e64d..360be19 100644 --- a/frontend/src/app/about/ExecProfile.tsx +++ b/frontend/src/app/about/ExecProfile.tsx @@ -1,54 +1,70 @@ import * as Dialog from "@radix-ui/react-dialog"; +import { SocialIcon } from "react-social-icons"; import Image from "next/image"; + + import ProfileModal from "./ProfileModal"; +import { Executive } from "./ExecProfiles"; + + +export default function ExecProfile(exec: Executive) { -interface ExecProfileProps -{ - ID: string; - - Name: string; - - ImageBuffer: string; - - Position: Array; - - Description: string; -} - -export default function ExecProfile({ID, Name, ImageBuffer, Position, Description} : ExecProfileProps) -{ - + + /* + Anderson's thoughts: + + This entire component is black magic. + */ return (
-
+
- - - {Name} -
{Name}
- + + {exec.name} + +
{exec.name}
+

{exec.roles.join(" & ")}

+ +
+ {Object.entries(exec.social_media_links).map(([platform, url]) => ( + + ))} +
- - + {/* FRANKLY THIS IS AWFUL */} + +
-

{Position.join(" & ")}

-
); -} - +
+ ); +} \ No newline at end of file diff --git a/frontend/src/app/about/ExecProfiles.tsx b/frontend/src/app/about/ExecProfiles.tsx index 9d961a8..1f6d80d 100644 --- a/frontend/src/app/about/ExecProfiles.tsx +++ b/frontend/src/app/about/ExecProfiles.tsx @@ -1,13 +1,17 @@ import ExecProfile from './ExecProfile'; -interface Executive { +export interface Executive { id: string; roles: string[]; name: string; + pronouns: string; profile_picture: string | null; current_status: string; bio: string; + first_term: string; last_term: string; + social_media_links: { [key: string]: string } + } async function getExecutives() { @@ -55,21 +59,10 @@ export default async function ExecProfiles() { {/* Block for current executives grouped by year */} {Object.keys(groupedCurrentExecutives).map(year => (
-

Current Executives:

+

Current Executives:

{groupedCurrentExecutives[year].map((exec) => ( - + ))}
@@ -78,21 +71,10 @@ export default async function ExecProfiles() { {/* Block for retired executives grouped by year */} {sortedRetiredYears.map(year => (
-

Retired Executives - {year}:

+

Retired Executives - {year}:

{groupedRetiredExecutives[year].map((exec) => ( - + ))}
diff --git a/frontend/src/app/about/ProfileModal.tsx b/frontend/src/app/about/ProfileModal.tsx index 7dc72fd..ac4a788 100644 --- a/frontend/src/app/about/ProfileModal.tsx +++ b/frontend/src/app/about/ProfileModal.tsx @@ -2,49 +2,51 @@ import * as Dialog from "@radix-ui/react-dialog"; import Image from "next/image"; import { DialogTitle } from "@radix-ui/react-dialog"; import { VisuallyHidden } from "@radix-ui/react-visually-hidden"; +import { SocialIcon } from "react-social-icons"; -interface ProfileModalProps { - ID: String; +import { Executive } from "./ExecProfiles"; - Name: string; - - Position: string; - - Description: string; - - ImageBuffer: string; - - imageWidth: number; -} - -export default function ProfileModal({Name, Position, ImageBuffer, Description, imageWidth}: ProfileModalProps) { +export default function ProfileModal({ id, roles, name, pronouns, profile_picture, current_status, bio, first_term, last_term, social_media_links }: Executive) { return ( // TODO: FIX modal description text doesn't scroll - + - {Name} + {name} - +
{/* Profile Image and Info Section */} -
- {`Profile + {`Profile
-

{Name}

-

{Position}

+

{name}

+

{roles.join(" & ")}

-
+ {Object.entries(social_media_links).map(([platform, url]) => ( + + ))} +
+ {/* Description Section */} -
-

Description

-

{Description}

+
+

About:

+

{bio ? bio : "Nothing here. :("}

{/* Close Button */}