From e2672052d26eda70833070229aed922e7f26c79d Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Fri, 11 Feb 2022 17:50:10 -0800 Subject: [PATCH] whole modal done, now just need to create stuff for conversation and all --- .../web/components/Drawer/CreateItemModal.tsx | 25 ++++++++++++++++--- .../components/MainTabsOrPages/ViewConvo.tsx | 10 +++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/packages/web/components/Drawer/CreateItemModal.tsx b/packages/web/components/Drawer/CreateItemModal.tsx index e8fbee2..f7217ab 100644 --- a/packages/web/components/Drawer/CreateItemModal.tsx +++ b/packages/web/components/Drawer/CreateItemModal.tsx @@ -7,8 +7,10 @@ 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) { @@ -23,20 +25,21 @@ export default function CreateItemModal(props: { const handleCancel = () => { toast.success("closing"); + props.handleClose(); }; return ( - + - Link - + Link + Please make sure this is valid for others to access. {/* icon and link input */} @@ -55,6 +58,20 @@ export default function CreateItemModal(props: { /> + + + Title + + Make sure this makes sense to everyone. + + setLinkDesc(e.target.value)} + /> + ); diff --git a/packages/web/components/MainTabsOrPages/ViewConvo.tsx b/packages/web/components/MainTabsOrPages/ViewConvo.tsx index 2e71f8f..2ed1946 100644 --- a/packages/web/components/MainTabsOrPages/ViewConvo.tsx +++ b/packages/web/components/MainTabsOrPages/ViewConvo.tsx @@ -245,6 +245,10 @@ export default function ViewConvo(props: { conversationId: string }) { const [showItemModal, setShowItemModal] = useState(false); const [pastedLink, setPastedLink] = useState(""); + const handleCloseDrawerItemModal = () => { + setShowItemModal(false); + }; + const handleOpenDrawerItemModal = () => { navigator.clipboard .readText() @@ -279,7 +283,11 @@ export default function ViewConvo(props: { conversationId: string }) { return ( <> - +
{/* convo name and action buttons on top */}