From 7de1dcf248fe217a89816a9c9a26b8a358fb71dc Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Thu, 16 Mar 2023 09:12:39 -0500 Subject: [PATCH] remove redundant image upload button --- src/components/post-modal/index.tsx | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/components/post-modal/index.tsx b/src/components/post-modal/index.tsx index 5c781a44e..76d4e4e2c 100644 --- a/src/components/post-modal/index.tsx +++ b/src/components/post-modal/index.tsx @@ -52,7 +52,6 @@ export const PostModal = ({ isOpen, onClose, initialDraft }: PostModalProps) => const { isOpen: showPreview, onToggle: togglePreview } = useDisclosure(); const [draft, setDraft] = useState(() => Object.assign(emptyDraft(), initialDraft)); const imageUploadRef = useRef(null); - const imageCaptureRef = useRef(null); const [uploading, setUploading] = useState(false); const uploadImage = async (imageFile: File) => { @@ -142,16 +141,6 @@ export const PostModal = ({ isOpen, onClose, initialDraft }: PostModalProps) => if (img) uploadImage(img); }} /> - { - const img = e.target.files?.[0]; - if (img) uploadImage(img); - }} - /> } aria-label="Upload Image" @@ -159,15 +148,6 @@ export const PostModal = ({ isOpen, onClose, initialDraft }: PostModalProps) => onClick={() => imageUploadRef.current?.click()} isLoading={uploading} /> - {isMobile && ( - } - aria-label="Capture Image" - title="Capture Image" - onClick={() => imageUploadRef.current?.click()} - isLoading={uploading} - /> - )} {draft.content.length > 0 && }