diff --git a/public/public/assets/img/one-ai.png b/public/public/assets/img/one-ai.png new file mode 100644 index 00000000..8e13b073 Binary files /dev/null and b/public/public/assets/img/one-ai.png differ diff --git a/public/src/Home.js b/public/src/Home.js index 07beced8..8eeabbd5 100644 --- a/public/src/Home.js +++ b/public/src/Home.js @@ -4,11 +4,22 @@ import ProjectCard from './components/ProjectCard'; import Footer from './components/Footer'; import FeaturedContent from './components/FeaturedContent'; -export default function Home() { - const projectCards = [ - , - , - ]; +export default function Home( {projects} ) { + const projectCards = projects.map((project) => { + // Create a new ProjectCard object for each project in the 'projects' array + return ( + + ); + }); return ( <> diff --git a/public/src/Projects.js b/public/src/Projects.js index ff99dc17..0f7f9816 100644 --- a/public/src/Projects.js +++ b/public/src/Projects.js @@ -4,49 +4,30 @@ import ProjectCard from './components/ProjectCard'; /* * The Projects page. + * + * @param String[] projects "An array of attributes, frontend, backend, id, name, description, url, img, and imgCaption" */ -export default function Projects() { - /* - * An array of project data to feed to the ProjectDisplay component. - { - frontend: "", - backend: "", - id: "", - name: "", - description: "", - url: "", - img: "" - }, - */ - const data = [ - { - frontend: "java", - backend: "", - id: "dnd", - name: "D&D", - description: "Dungeons and Dragons character builder app, developed in Java.", - url: "https://github.com/quaxlyqueen/dnd", - img: "/assets/img/dnd.png" - }, - { - frontend: "java", - backend: "", - id: "graph", - name: "Graph Visualizer", - description: "Interactive representation of a graph data structure, developed in Java.", - url: "https://github.com/quaxlyqueen/2420-graph-visualizer", - img: "/assets/img/graph.png" - }, - ]; - - let i = 0; +export default function Projects( {projects} ) { + const projectCards = projects.map((project) => { + // Create a new ProjectCard object for each project in the 'projects' array + return ( + + ); + }); return ( <>
- {data.map(item => ( - - ))} + {projectCards}