From 9f810378f179f245031bd7ad27e7befd7c2bf6ed Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Wed, 30 Mar 2022 20:02:16 -0700 Subject: [PATCH] remove expiration modal --- .../new-post/expiration-modal/index.tsx | 61 ------------------- .../expiration-modal/modal.module.css | 4 -- client/components/new-post/index.tsx | 1 - 3 files changed, 66 deletions(-) delete mode 100644 client/components/new-post/expiration-modal/index.tsx delete mode 100644 client/components/new-post/expiration-modal/modal.module.css diff --git a/client/components/new-post/expiration-modal/index.tsx b/client/components/new-post/expiration-modal/index.tsx deleted file mode 100644 index cd70d58d..00000000 --- a/client/components/new-post/expiration-modal/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ - -import { Modal, Note, Spacer, Input } from "@geist-ui/core" -import { useCallback, useState } from "react" -import DatePicker from 'react-datepicker'; -// import "react-datepicker/dist/react-datepicker.css"; -import styles from './modal.module.css' - -type Props = { - isOpen: boolean - onClose: () => void - onSubmit: (expiresAt: Date) => void -} - -const ExpirationModal = ({ isOpen, onClose, onSubmit: onSubmitAfterVerify }: Props) => { - const [error, setError] = useState() - const [date, setDate] = useState(new Date()); - const onSubmit = () => { - onSubmitAfterVerify(date) - } - - const onDateChange = (date: Date) => { - setDate(date) - } - - const CustomTimeInput = ({ value, onChange }: { - date: Date, - value: string, - onChange: (date: string) => void - }) => { - return ( - onChange(e.target.value)} - htmlType="time" - />) - } - - return (<> - {/* TODO: investigate disableBackdropClick not updating state? */} - { - Enter an expiration time - - } - showTimeInput={true} - // @ts-ignore - customTimeInput={} - timeInputLabel="Time:" - dateFormat="MM/dd/yyyy h:mm aa" - /> - - Cancel - Submit - } - ) -} - - -export default ExpirationModal \ No newline at end of file diff --git a/client/components/new-post/expiration-modal/modal.module.css b/client/components/new-post/expiration-modal/modal.module.css deleted file mode 100644 index 93dd09ab..00000000 --- a/client/components/new-post/expiration-modal/modal.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.wrapper { - /* For date picker */ - overflow: visible !important; -} diff --git a/client/components/new-post/index.tsx b/client/components/new-post/index.tsx index 49f7762f..0d5ed9ec 100644 --- a/client/components/new-post/index.tsx +++ b/client/components/new-post/index.tsx @@ -212,7 +212,6 @@ const Post = () => { - {/* */} ) }