From 9f7967bfc3fe0593631619b75f40d39c1441b0ed Mon Sep 17 00:00:00 2001 From: Himanshu Jha <157563599+himanshujha05@users.noreply.github.com> Date: Thu, 22 Jan 2026 11:38:26 -0700 Subject: [PATCH 1/3] Implement contributor data fetching and display Added contributor data fetching and dynamic rendering of contributor names with links. --- pages/aboutus/index.js | 50 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/pages/aboutus/index.js b/pages/aboutus/index.js index b146c72..418e1a3 100644 --- a/pages/aboutus/index.js +++ b/pages/aboutus/index.js @@ -1,9 +1,11 @@ import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar"; -import { createTheme, ThemeProvider, Container, Box } from "@mui/material"; -import "bootstrap/dist/css/bootstrap.min.css"; +import { createTheme, ThemeProvider, Container, Box, Button, Collapse } from "@mui/material"; +import 'bootstrap/dist/css/bootstrap.min.css'; import { Card } from "react-bootstrap"; import isulogo from "../../components/images/ISULogo.png"; import Image from "next/image"; +import { useState, useEffect } from "react"; +import Link from "next/link"; export default function AboutUsPage() { const theme = createTheme({ @@ -15,6 +17,31 @@ export default function AboutUsPage() { }); const cardBodyStyle = { padding: "20px" }; + const [contributorData, setContributorData] = useState({}); + + // Fetch contributor metadata from backend + useEffect(() => { + const fetchAllContributorData = async () => { + const dataMap = {}; + + for (const name of contributors) { + try { + const encodedName = encodeURIComponent(name); + const response = await fetch(`https://api.redux.portneuf.cose.isu.edu/Navigation/ContributorProfile/${encodedName}`); + if (response.ok) { + const data = await response.json(); + dataMap[name] = data; + } + } catch (error) { + console.warn(`Failed to fetch data for ${name}:`, error); + } + } + + setContributorData(dataMap); + }; + + fetchAllContributorData(); + }, []); const contributors = [ "Kaden Marchetti", @@ -159,9 +186,22 @@ export default function AboutUsPage() { lineHeight: "1.6", }} > - {contributors.map((name, index) => ( -
- Below are research publications associated with the Redux project - and its contributors: -
+Below are research publications associated with the Redux project and its contributors:
@@ -175,70 +140,51 @@ export default function AboutUsPage() {This project was started by Dr.{" "} - + Paul Bodily , who is also the ISU Faculty Sponsor of the project.
-- The students who contributed to the creation of the application - are: -
+The students who contributed to the creation of the application are:
- {/* Column-ordered 3-column layout */} -