From e5162a2aafea11c69d37790b1eaaaaea07cfc7f8 Mon Sep 17 00:00:00 2001 From: Ebube Date: Fri, 26 Jan 2024 01:46:56 +0100 Subject: [PATCH] refactored some things --- src/components/jobPopout/JobListPopout.jsx | 377 ++++++++++----------- 1 file changed, 181 insertions(+), 196 deletions(-) diff --git a/src/components/jobPopout/JobListPopout.jsx b/src/components/jobPopout/JobListPopout.jsx index 5c3d5da..f805719 100644 --- a/src/components/jobPopout/JobListPopout.jsx +++ b/src/components/jobPopout/JobListPopout.jsx @@ -250,6 +250,147 @@ function JobListPopout({ }); }, []); + const DetailsSection = ({ label, value }) => ( +
+ +
+ ); + + const DetailsComponent = () => { + const detailsArray = [ + { label: "Description", value: details.description }, + { label: "Price", value: details.thePrice }, + { label: "Timeline", value: `${details.timeline_days} day(s)` }, + { label: "Created", value: new Date(details?.created).toDateString() }, + ]; + + return ( +
+ {/*

{details.title}

*/} + + {/* INPUT SECTION */} + {detailsArray.map((detail, index) => ( + + ))} + +
+ +