diff --git a/pages/aboutus/index.js b/pages/aboutus/index.js index b146c72..1347625 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, Dialog, DialogTitle, DialogContent, DialogActions, IconButton } from "@mui/material"; +import CloseIcon from "@mui/icons-material/Close"; +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"; export default function AboutUsPage() { const theme = createTheme({ @@ -15,7 +17,14 @@ export default function AboutUsPage() { }); const cardBodyStyle = { padding: "20px" }; + + // State management + const [contributorData, setContributorData] = useState({}); + const [selectedContributor, setSelectedContributor] = useState(null); + const [modalOpen, setModalOpen] = useState(false); + const [loading, setLoading] = useState(false); + // Contributors array defined FIRST const contributors = [ "Kaden Marchetti", "Caleb Eardley", @@ -36,39 +45,77 @@ export default function AboutUsPage() { "George Lake", "Grant Gardner", "Jason Wright", - "Alex Svancara", - "Eric Hill", - "Max Grünwoldt", + "Alex Svancara", + "Eric Hill", + "Max Grünwoldt", "Paul Gilbreath", "Andreas Kramer", "Courtney Bodily", "Rakesh Itani" ]; + // Fetch all contributor data on mount + useEffect(() => { + const fetchAllContributorData = async () => { + const dataMap = {}; + + for (const name of contributors) { + try { + const encodedName = encodeURIComponent(name); + const response = await fetch(`http://localhost:27000/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(); + }, []); + + // Handle contributor click - open modal + const handleContributorClick = (name) => { + setLoading(true); + setSelectedContributor(name); + + // Simulate loading if data already cached + setTimeout(() => { + setLoading(false); + setModalOpen(true); + }, 300); + }; + + // Close modal + const handleCloseModal = () => { + setModalOpen(false); + setSelectedContributor(null); + setLoading(false); + }; + const publications = [ { - title: - "R. Phillips and P. M. Bodily, “Spade: A library for programmatic parsing and verification of discrete data structures,” in 2025 Intermountain Engineering, Technology and Computing (IETC), pp. 1–5, IEEE, 2025.", + title: "R. Phillips and P. M. Bodily, Spade: A library for programmatic parsing and verification of discrete data structures, in 2025 Intermountain Engineering, Technology and Computing (IETC), pp. 1–5, IEEE, 2025.", link: "https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11039449", }, { - title: - "K. Marchetti, A. Sevaljevic, A. Diviney, R. Phillips, C. Eardley, R. Khadka, D. Igbokwe, and P. M. Bodily, “Redux: An interactive, dynamic knowledge base for teaching NP-completeness,” in Proceedings of the 29th annual ACM conference on Innovation and Technology in Computer Science Education (ITiCSE), 2024.", + title: "K. Marchetti, A. Sevaljevic, A. Diviney, R. Phillips, C. Eardley, R. Khadka, D. Igbokwe, and P. M. Bodily, Redux: An interactive, dynamic knowledge base for teaching NP-completeness, in Proceedings of the 29th annual ACM conference on Innovation and Technology in Computer Science Education (ITiCSE), 2024.", link: "https://etd.iri.isu.edu/ViewSpecimen.aspx?ID=2206", }, { - title: - "A. Sevaljevic and P. M. Bodily, “Comparative empirical analysis of dancing links implementations to solve the exact cover problem,” in Proceedings of the 4th Intermountain Engineering, Technology, and Computing Conference (i-ETC), pp. 255–258, IEEE, 2024.", + title: "A. Sevaljevic and P. M. Bodily, Comparative empirical analysis of dancing links implementations to solve the exact cover problem, in Proceedings of the 4th Intermountain Engineering, Technology, and Computing Conference (i-ETC), pp. 255–258, IEEE, 2024.", link: "https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10564396", }, { - title: - 'K. Marchetti and P. Bodily, "Visualizing the 3SAT to CLIQUE Reduction Process," 2022 Intermountain Engineering, Technology and Computing (IETC), Orem, UT, USA, 2022, pp. 1-5, doi: 10.1109/IETC54973.2022.9796851.', + title: "K. Marchetti and P. Bodily, Visualizing the 3SAT to CLIQUE Reduction Process, 2022 Intermountain Engineering, Technology and Computing (IETC), Orem, UT, USA, 2022, pp. 1-5, doi: 10.1109/IETC54973.2022.9796851.", link: "https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9796851", }, { - title: - 'K. Marchetti and P. Bodily, "KAMI: Leveraging the power of crowd-sourcing to solve complex, real-world problems," 2022 Intermountain Engineering, Technology and Computing (IETC), Orem, UT, USA, 2022, pp. 1-4, doi: 10.1109/IETC54973.2022.9796945.', + title: "K. Marchetti and P. Bodily, KAMI: Leveraging the power of crowd-sourcing to solve complex, real-world problems, 2022 Intermountain Engineering, Technology and Computing (IETC), Orem, UT, USA, 2022, pp. 1-4, doi: 10.1109/IETC54973.2022.9796945.", link: "https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9796945", }, ]; @@ -91,7 +138,7 @@ export default function AboutUsPage() { target="_blank" rel="noopener noreferrer" > - "Reducibility Among Combinatorial Problems" + {"Reducibility Among Combinatorial Problems"} {" "} {"(Karp, 1972)."} @@ -159,30 +206,44 @@ export default function AboutUsPage() { lineHeight: "1.6", }} > - {contributors.map((name, index) => ( -
• {name}
- ))} + {contributors.map((name, index) => { + return ( +
+ • handleContributorClick(name)} + style={{ + color: "#f47920", + textDecoration: "underline", + cursor: "pointer", + fontWeight: "500" + }} + > + {name} + +
+ ); + })} - {/* LEARN MORE Card */} - - Learn More - - {`Additional documentation can be found at the following links:`} - - - - + {/* LEARN MORE Card */} + + Learn More + + {`Additional documentation can be found at the following links:`} + + + + + {/* ISU Logo */} + + {/* Contributor Profile Modal */} + + + {selectedContributor && `${selectedContributor}'s Profile`} + theme.palette.grey[500], + }} + > + + + + + {loading ? ( +

Loading...

+ ) : selectedContributor && contributorData[selectedContributor] ? ( +
+
Personal Information
+

Email: {contributorData[selectedContributor].email || "Not specified"}

+

Education: {contributorData[selectedContributor].education || "Not specified"}

+

Major: {contributorData[selectedContributor].major || "Not specified"}

+

Bio: {contributorData[selectedContributor].bio || "Not specified"}

+ +
Contributions
+

Total Contributions: {contributorData[selectedContributor].totalContributions || 0}

+ + {contributorData[selectedContributor].problemsContributed && contributorData[selectedContributor].problemsContributed.length > 0 && ( +
+ Problems: {contributorData[selectedContributor].problemsContributed.length} +
    + {contributorData[selectedContributor].problemsContributed.map((problem, idx) => ( +
  • {problem}
  • + ))} +
+
+ )} + + {contributorData[selectedContributor].solversCreated && contributorData[selectedContributor].solversCreated.length > 0 && ( +
+ Solvers: {contributorData[selectedContributor].solversCreated.length} +
    + {contributorData[selectedContributor].solversCreated.map((solver, idx) => ( +
  • {solver}
  • + ))} +
+
+ )} + + {contributorData[selectedContributor].reductionsCreated && contributorData[selectedContributor].reductionsCreated.length > 0 && ( +
+ Reductions: {contributorData[selectedContributor].reductionsCreated.length} +
    + {contributorData[selectedContributor].reductionsCreated.map((reduction, idx) => ( +
  • {reduction}
  • + ))} +
+
+ )} +
+ ) : ( +

No data found

+ )} +
+ + + +
); }