import React, { useState } from "react"; import Modal from "../Modal"; import Button from "../ui/Button"; import { useTranslation } from "next-i18next"; type Props = { onClose: Function; submit: Function; }; export default function SurveyModal({ onClose, submit }: Props) { const { t } = useTranslation(); const [referer, setReferrer] = useState("rather_not_say"); const [other, setOther] = useState(""); return (

{t("quick_survey")}

{t("how_did_you_discover_linkwarden")}

{referer === "other" && ( { setOther(e.target.value); }} value={other} className="input border border-neutral-content focus:border-primary focus:outline-none duration-100 w-full bg-base-200 rounded-[0.375rem] min-h-0 h-[2.625rem] leading-4 p-2" /> )}
); }