Fix images not setting properly
This commit is contained in:
parent
b0e37b56c0
commit
cfb498794f
@ -16,7 +16,7 @@ export const Author = ({ name, icon, setReminder }: Props) => {
|
||||
class="is-rounded embed_author_url"
|
||||
url={icon}
|
||||
alt="Image for embed author"
|
||||
setImage={(url) => {
|
||||
setImage={(url: string) => {
|
||||
setReminder((reminder) => ({
|
||||
...reminder,
|
||||
embed_author_url: url,
|
||||
|
@ -65,7 +65,12 @@ export const Embed = () => {
|
||||
class="embed_thumbnail_url"
|
||||
url={reminder.embed_thumbnail_url}
|
||||
alt="Square thumbnail embedded image"
|
||||
setImage={() => {}}
|
||||
setImage={(url: string) =>
|
||||
setReminder((reminder: Reminder) => ({
|
||||
...reminder,
|
||||
embed_thumbnail_url: url || null,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
@ -76,7 +81,12 @@ export const Embed = () => {
|
||||
class="embed_image_url"
|
||||
url={reminder.embed_image_url}
|
||||
alt="Large embedded image"
|
||||
setImage={() => {}}
|
||||
setImage={(url: string) =>
|
||||
setReminder((reminder: Reminder) => ({
|
||||
...reminder,
|
||||
embed_image_url: url || null,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</p>
|
||||
|
||||
|
@ -33,6 +33,7 @@ const ImagePickerModal = ({ setModalOpen, setImage }) => {
|
||||
title={"Enter Image URL"}
|
||||
onSubmit={() => {
|
||||
setImage(value);
|
||||
setModalOpen(false);
|
||||
}}
|
||||
onSubmitText={"Save"}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user