import { Link } from "@nirvana/common/models/conversation"; import Modal from "antd/lib/modal/Modal"; import { useState, useEffect } from "react"; import toast from "react-hot-toast"; import LinkIcon from "./LinkIcon"; export default function CreateItemModal(props: { pastedLink: string; show: boolean; handleClose: () => void; }) { const [linkVal, setLinkVal] = useState(""); const [linkDesc, setLinkDesc] = useState(""); useEffect(() => { if (props.pastedLink) { setLinkVal(props.pastedLink); } }, [props.pastedLink]); const handleCreate = () => { console.log("added drawer item"); toast.success("added drawer item to conversation"); }; const handleCancel = () => { toast.success("closing"); props.handleClose(); }; return ( Link Please make sure this is valid for others to access. {/* icon and link input */} setLinkVal(e.target.value)} /> Title Make sure this makes sense to everyone. setLinkDesc(e.target.value)} /> ); }