import React, { useState } from "react" import { useTranslation } from "react-i18next" import Button from "../../fundamentals/button" import DiscordIcon from "../../fundamentals/icons/discord-icon" import InputField from "../../molecules/input" import TextArea from "../../molecules/textarea" import * as Dialog from "@radix-ui/react-dialog" type MailDialogProps = { onClose: () => void open: boolean } const MailDialog = ({ open, onClose }: MailDialogProps) => { const { t } = useTranslation() const [subject, setSubject] = useState("") const [body, setBody] = useState("") const [link, setLink] = useState("mailto:support@medusajs.com") React.useEffect(() => { setLink( `mailto:support@medusajs.com?subject=${encodeURI( subject )}&body=${encodeURI(body)}` ) }, [subject, body]) return (
{t("help-dialog-how-can-we-help", "How can we help?")} {t( "help-dialog-we-usually-respond-in-a-few-hours", "We usually respond in a few hours" )} setSubject(e.target.value)} />