From 03f032998454b31702b2d5dd96d10ae582497f73 Mon Sep 17 00:00:00 2001 From: keyan Date: Sun, 13 Aug 2023 14:12:18 -0500 Subject: [PATCH] fix image uploading/edit --- components/avatar.js | 30 ++++++++++++++++-------------- components/job-form.js | 2 +- pages/settings.js | 6 +++--- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/components/avatar.js b/components/avatar.js index 2e71b330..e9d08c32 100644 --- a/components/avatar.js +++ b/components/avatar.js @@ -9,13 +9,14 @@ import { useShowModal } from './modal' export default function Avatar ({ onSuccess }) { const [uploading, setUploading] = useState() - const ref = useRef() - const [scale, setScale] = useState(1) const showModal = useShowModal() const Body = ({ onClose, file, upload }) => { + const [scale, setScale] = useState(1) + const ref = useRef() + return ( -
+
- setScale(parseFloat(e.target.value))} + setScale(parseFloat(e.target.value))} min={1} max={2} step='0.05' - defaultValue={scale} + // defaultValue={scale} /> -
diff --git a/components/job-form.js b/components/job-form.js index c484e0a5..d710a2fb 100644 --- a/components/job-form.js +++ b/components/job-form.js @@ -80,7 +80,7 @@ export default function JobForm ({ item, sub }) { } else { await router.push(`/~${sub.name}/recent`) } - }, [upsertJob, router]) + }, [upsertJob, router, item?.id, sub?.name, logoId]) const invoiceableUpsertJob = useInvoiceable(submitUpsertJob, { requireSession: true }) diff --git a/pages/settings.js b/pages/settings.js index ce2b1c40..2ed3b14e 100644 --- a/pages/settings.js +++ b/pages/settings.js @@ -52,7 +52,7 @@ export default function Settings ({ ssrData }) { return (
-

settings

+

settings

nostr NIP-05} + header={

nostr NIP-05

} body={ <> save
-
+
saturday newsletter
{settings?.authMethods && }