Skip to content

Commit

Permalink
fix: header image change not to replace content
Browse files Browse the repository at this point in the history
  • Loading branch information
drodil committed Dec 4, 2024
1 parent 3b2292f commit b4c5c6c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions plugins/qeta-react/src/components/PostForm/PostForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,17 @@ export const PostForm = (props: PostFormProps) => {
<Alert severity="error">{t('postForm.errorPosting', { type })}</Alert>
)}
{type === 'article' && (
<HeaderImageInput
onChange={(url?: string) =>
setValues(v => ({ ...v, headerImage: url }))
}
onImageUpload={onImageUpload}
url={values.headerImage}
postId={id ? Number(id) : undefined}
<Controller
control={control}
render={({ field: { onChange, value } }) => (
<HeaderImageInput
onChange={onChange}
onImageUpload={onImageUpload}
url={value}
postId={id ? Number(id) : undefined}
/>
)}
name="headerImage"
/>
)}
<TextField
Expand Down

0 comments on commit b4c5c6c

Please sign in to comment.