import { Modal } from "../Modal"; import { useState } from "preact/hooks"; export const ImagePicker = ({ alt, url, setImage, ...props }) => { const [modalOpen, setModalOpen] = useState(false); return ( <> { setModalOpen(true); }} role={"button"} > {modalOpen && ( )} > ); }; const ImagePickerModal = ({ setModalOpen, setImage }) => { const [value, setValue] = useState(""); return ( { setImage(value); setModalOpen(false); }} onSubmitText={"Save"} > Please note: if you attach an image directly from Discord, it will not be visible in the dashboard, but will be visible on reminders. Other image-sharing sites such as Imgur don't have this issue. { setValue(ev.currentTarget.value); }} > ); };
Please note: if you attach an image directly from Discord, it will not be visible in the dashboard, but will be visible on reminders. Other image-sharing sites such as Imgur don't have this issue.