@@ -4,14 +4,14 @@ import toast from 'react-hot-toast';
4
4
import { BsTrash } from 'react-icons/bs' ;
5
5
import { useQueryClient } from 'react-query' ;
6
6
import { useNavigate } from 'react-router-dom' ;
7
- import placeholderImage from '../../assets/placeholder.png' ;
8
7
import { Utils } from '../../utils' ;
9
8
import Button from '../Button' ;
10
9
import Form from '../Form/Form' ;
11
10
import FormError from '../Form/FormError' ;
12
11
import FormField from '../Form/FormField' ;
13
12
import FormInput from '../Form/FormInput' ;
14
13
import IconButton from '../IconButton' ;
14
+ import { ImageDto } from 'shared-types/dist/ImageDto' ;
15
15
16
16
export interface EntityDeleteDialogProps {
17
17
entityName : string ;
@@ -20,6 +20,7 @@ export interface EntityDeleteDialogProps {
20
20
identifier : string ;
21
21
deletedItems ?: string [ ] ;
22
22
confirmBeforeDelete ?: boolean ;
23
+ image ?: ImageDto ;
23
24
}
24
25
25
26
function EntityDeleteDialog ( {
@@ -29,6 +30,7 @@ function EntityDeleteDialog({
29
30
identifier,
30
31
deletedItems = [ ] ,
31
32
confirmBeforeDelete = false ,
33
+ image,
32
34
} : EntityDeleteDialogProps ) {
33
35
const [ loading , setLoading ] = useState ( false ) ;
34
36
const [ error , setError ] = useState < string | null > ( null ) ;
@@ -58,7 +60,7 @@ function EntityDeleteDialog({
58
60
< div className = "my-6 flex w-96 gap-4 rounded-md border border-gray-300 p-4" >
59
61
< div >
60
62
< img
61
- src = { placeholderImage }
63
+ src = { image ?. url || '/api/images/default' }
62
64
className = "w-16 rounded-md"
63
65
width = { 50 }
64
66
height = { 50 }
0 commit comments