Skip to content

Commit

Permalink
fix: image update input
Browse files Browse the repository at this point in the history
  • Loading branch information
bepyan committed Aug 23, 2024
1 parent 8f7a62e commit 06cc82f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export default function ImageSetting({
const imageUploadMutation = useMutation({
mutationFn: uploadImage,
onSuccess: (url) => {
const inputEl = document.querySelector<HTMLInputElement>("#image_src");
if (inputEl) {
inputEl.value = url;
}
dispatch({
type: "UPDATE_ELEMENT",
payload: {
Expand Down
6 changes: 6 additions & 0 deletions src/components/editor/sidebar/sidebar-settings-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ function SEOSection() {
const uploadImageMutation = useMutation({
mutationFn: uploadImage,
onSuccess: (url) => {
const inputEl = document.querySelector<HTMLInputElement>(
"#invitationThumbnail",
);
if (inputEl) {
inputEl.value = url;
}
dispatch({
type: "UPDATE_CONFIG",
payload: {
Expand Down

0 comments on commit 06cc82f

Please sign in to comment.