Skip to content

Commit

Permalink
Merge pull request #27 from NwinNwin/steven-feedback+modal
Browse files Browse the repository at this point in the history
Steven feedback+modal
  • Loading branch information
stevem-zhou authored Sep 20, 2023
2 parents 07094ed + e3d9caf commit 8f762e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/components/InfoModal/InfoModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ import ImageContainer from "../ImageContainer/ImageContainer";
import FeedbackModal from "../FeedbackModal/FeedbackModal";
import { LinkIcon, CheckIcon, EmailIcon, PhoneIcon } from "@chakra-ui/icons";

export default function InfoModal({ setData, isOpen, onClose, onOpen, props }) {
export default function InfoModal({ setData, isOpen, onClose, props }) {
const [showEmail, setShowEmail] = useState(false);
const { onLoginModalOpen } = useContext(DataContext);
const { user } = UserAuth();
const navigate = useNavigate();
const feedbackModalDisclosure = useDisclosure();
const currentEmail = user?.email;

// function viewEmail() {
// if (user) {
// setShowEmail(true);
// }
// }

async function handleDelete() {
async function handleResolve() {
feedbackModalDisclosure.onOpen();
}

Expand Down Expand Up @@ -140,7 +140,7 @@ export default function InfoModal({ setData, isOpen, onClose, onOpen, props }) {
}
}}
>
<PhoneIcon /> View Contact
<EmailIcon /> View Contact
</Button>
) : (
<Button size="lg" variant="outline" colorScheme="blue">
Expand All @@ -152,10 +152,10 @@ export default function InfoModal({ setData, isOpen, onClose, onOpen, props }) {
colorScheme="green"
size={"lg"}
gap={2}
onClick={handleDelete}
onClick={handleResolve}
isDisabled={props.isresolved ? true : false}
>
{currentEmail === props.email ? <CheckIcon /> Resolve : <EmailIcon /> View Contact}
<CheckIcon /> Resolve
</Button>
)}
<Button
Expand Down
1 change: 0 additions & 1 deletion src/components/ResultCard/ResultCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function ResultCard({ props, setData, onResultsBarClose }) {
{(infoModalDisclosure.isOpen || id) && (
<InfoModal
props={props}
onOpen={infoModalDisclosure.onOpen}
onClose={infoModalDisclosure.onClose}
isOpen={id === props.id.toString() ? true: infoModalDisclosure.isOpen}
setData={setData}
Expand Down

0 comments on commit 8f762e0

Please sign in to comment.