From 68ec20f505ccbe45c28ef018f3d290fddacbcade Mon Sep 17 00:00:00 2001 From: Dang Nguyen Nguyen Date: Sun, 17 Sep 2023 17:29:09 -0700 Subject: [PATCH] updated infomodal --- .../ImageContainer/ImageContainer.jsx | 45 ++--- src/components/InfoModal/InfoModal.jsx | 163 +++++++++--------- 2 files changed, 108 insertions(+), 100 deletions(-) diff --git a/src/components/ImageContainer/ImageContainer.jsx b/src/components/ImageContainer/ImageContainer.jsx index 8b0dd6c..d05708c 100644 --- a/src/components/ImageContainer/ImageContainer.jsx +++ b/src/components/ImageContainer/ImageContainer.jsx @@ -2,26 +2,31 @@ import { Image, Flex, Text } from "@chakra-ui/react"; export default function ImageContainer({ image, isresolved }) { return ( - - {isresolved && - RETURNED - This item has been returned. - } - + + {isresolved && ( + + + RETURNED + + + This item has been returned. + + + )} + ); } diff --git a/src/components/InfoModal/InfoModal.jsx b/src/components/InfoModal/InfoModal.jsx index ef26b3e..45f819c 100644 --- a/src/components/InfoModal/InfoModal.jsx +++ b/src/components/InfoModal/InfoModal.jsx @@ -20,6 +20,7 @@ import { UserAuth } from "../../context/AuthContext"; import DataContext from "../../context/DataContext"; import axios from "axios"; import ImageContainer from "../ImageContainer/ImageContainer"; +import { LinkIcon, EmailIcon, CloseIcon, PhoneIcon } from "@chakra-ui/icons"; export default function InfoModal({ setData, isOpen, onClose, props }) { const [showEmail, setShowEmail] = useState(false); @@ -59,87 +60,87 @@ export default function InfoModal({ setData, isOpen, onClose, props }) { onClose(); navigate("/"); }} - size={{ base: "full", md: "md" }} + size={{ base: "full", md: "5xl" }} > -
- + + - - {currentEmail === props.email ? ( - - - Owner - - - ) : props.islost ? ( - - - Lost - - - ) : ( - - - Found - - - )} + {/* HEADING */} + {props.name} - - - {/* - - RESOLVED - - - */} + + {currentEmail === props.email ? ( + + + Owner + + + ) : props.islost ? ( + + + Lost + + + ) : ( + + + Found + + + )} + Posted: {formattedDate} + + - +
+ + {/* DESCRIPTION */} + + + Description: + + {props.islost ? ( + Lost on {props.itemDate} + ) : ( + Found on {props.itemDate} + )} + {props.description} + +
+ {currentEmail !== props.email && (!showEmail ? ( ) : ( - + ))} {currentEmail === props.email && ( - )} - {props.islost ? ( - Lost on {props.itemDate} - ) : ( - Found on {props.itemDate} - )} - Posted on {formattedDate} -
-
-
+ +
+ + );