diff --git a/src/assets/logos/resolved.png b/src/assets/logos/resolved.png new file mode 100644 index 0000000..f6a2825 Binary files /dev/null and b/src/assets/logos/resolved.png differ diff --git a/src/components/CreateModal/CreateModal.jsx b/src/components/CreateModal/CreateModal.jsx index 566d3c8..6fe3b4b 100644 --- a/src/components/CreateModal/CreateModal.jsx +++ b/src/components/CreateModal/CreateModal.jsx @@ -150,9 +150,9 @@ export default function CreateModal({ islost: true, name: "", description: "", - itemDate: "", - isResolved: false, - isHelped: null, + itemdate: "", + isresolved: false, + ishelped: null, }); setUploadImg(""); setActiveStep(0); @@ -173,9 +173,9 @@ export default function CreateModal({ islost: true, name: "", description: "", - itemDate: "", - isResolved: false, - isHelped: null, + itemdate: "", + isresolved: false, + ishelped: null, }); setUploadImg(""); setActiveStep(0); @@ -344,7 +344,7 @@ export default function CreateModal({ setDate(e); setNewAddedItem((prev) => ({ ...prev, - itemDate: e.toISOString().split("T")[0], + itemdate: e.toISOString().split("T")[0], })); }} value={date} @@ -515,7 +515,7 @@ export default function CreateModal({ > - {newAddedItem.itemDate} + {newAddedItem.itemdate} @@ -548,9 +548,9 @@ export default function CreateModal({ islost: true, name: "", description: "", - itemDate: "", - isResolved: false, - isHelped: null, + itemdate: "", + isresolved: false, + ishelped: null, }); setUploadImg(""); onClose(); @@ -565,7 +565,7 @@ export default function CreateModal({ (activeStep === 0 && newAddedItem.name === "") || newAddedItem.description === "" || (activeStep === 1 && newAddedItem.type === "") || - (activeStep === 2 && newAddedItem.itemDate === "") || + (activeStep === 2 && newAddedItem.itemdate === "") || (activeStep === 3 && uploadImg === "") } variant={"solid"} diff --git a/src/components/FeedbackModal/FeedbackModal.jsx b/src/components/FeedbackModal/FeedbackModal.jsx index 45feba0..cc53a1f 100644 --- a/src/components/FeedbackModal/FeedbackModal.jsx +++ b/src/components/FeedbackModal/FeedbackModal.jsx @@ -27,7 +27,9 @@ export default function FeedbackModal({ setLoading(false); axios .put(`${process.env.REACT_APP_AWS_BACKEND_URL}/items/${props.id}`, { - isHelped: feedbackHelped, + ...props, + isresolved: true, + ishelped: feedbackHelped, }) .then(() => console.log("Success")) .catch((err) => console.log(err)); @@ -37,7 +39,7 @@ export default function FeedbackModal({ return prevItems.map((item) => { if (item.id === props.id) { item.isresolved = true; - item.isHelped = feedbackHelped; + item.ishelped = feedbackHelped; } return item; }); diff --git a/src/components/Home/Home.jsx b/src/components/Home/Home.jsx index 9e39de7..278ebe9 100644 --- a/src/components/Home/Home.jsx +++ b/src/components/Home/Home.jsx @@ -84,9 +84,9 @@ export default function Home() { islost: true, name: "", description: "", - itemDate: "", - isResolved: false, - isHelped: null + itemdate: "", + isresolved: false, + ishelped: null, }); const [isEdit, setIsEdit] = useState(false); @@ -97,7 +97,7 @@ export default function Home() { const [screenWidth, setScreenWidth] = useState(window.screen.width); const [uploadImg, setUploadImg] = useState(""); - console.log(data) + console.log(data); // LOGIN MODAL const { @@ -137,10 +137,11 @@ export default function Home() { }; getData(); }, []); - + window.onresize = () => { setScreenWidth(window.screen.width); }; + console.log(data); return ( {user ? ( - - - - - - - - logoutbutton - {user?.email} - - { - setFindFilter((prev) => ({ - ...prev, - isYourPosts: !prev.isYourPosts, - })); - onOpen(); - }} - > + <> + Leaderboard + + logoutbutton - Your Posts - + - - logoutbutton - Logout - - - + + + logoutbutton + {user?.email} + + { + setFindFilter((prev) => ({ + ...prev, + isYourPosts: !prev.isYourPosts, + })); + onOpen(); + }} + > + logoutbutton + Your Posts + + + + logoutbutton + Logout + + + + ) : (