Fix handlers
This commit is contained in:
parent
a2f7cdd6b2
commit
af95cb3be2
2 changed files with 4 additions and 2 deletions
|
@ -77,6 +77,7 @@ const CategoryBackground: React.FC<CategoryBackgroundProps> = props => {
|
|||
onChange={event => onImageUpload(event.target.files[0])}
|
||||
type="file"
|
||||
ref={anchor}
|
||||
accept="image/*"
|
||||
/>
|
||||
</>
|
||||
}
|
||||
|
@ -90,7 +91,7 @@ const CategoryBackground: React.FC<CategoryBackgroundProps> = props => {
|
|||
</div>
|
||||
</CardContent>
|
||||
) : image === null ? (
|
||||
<ImageUpload onImageUpload={onImageUpload} />
|
||||
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
||||
) : (
|
||||
<CardContent>
|
||||
<ImageTile image={image} onImageDelete={onImageDelete} />
|
||||
|
|
|
@ -92,6 +92,7 @@ export const CollectionImage: React.FC<CollectionImageProps> = props => {
|
|||
onChange={event => onImageUpload(event.target.files[0])}
|
||||
type="file"
|
||||
ref={anchor}
|
||||
accept="image/*"
|
||||
/>
|
||||
</>
|
||||
}
|
||||
|
@ -105,7 +106,7 @@ export const CollectionImage: React.FC<CollectionImageProps> = props => {
|
|||
</div>
|
||||
</CardContent>
|
||||
) : image === null ? (
|
||||
<ImageUpload onImageUpload={onImageUpload} />
|
||||
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
||||
) : (
|
||||
<CardContent>
|
||||
<ImageTile image={image} onImageDelete={onImageDelete} />
|
||||
|
|
Loading…
Reference in a new issue