diff --git a/packages/my-joy-beta/src/components/create-instance/image.js b/packages/my-joy-beta/src/components/create-instance/image.js index bae1316c..5c511c01 100644 --- a/packages/my-joy-beta/src/components/create-instance/image.js +++ b/packages/my-joy-beta/src/components/create-instance/image.js @@ -48,18 +48,23 @@ export const Preview = ({ name, version, isVm }) => ( const Image = ({ onClick, active, ...image }) => { const { imageName = '', versions = [] } = image; - const ids = [`image-card-${imageName}`, `image-img-${imageName}`]; + const id = `image-card-${imageName}`; - const handleClick = ev => - includes(ids, ev.target.id) ? onClick(image) : null; + const handleCardClick = ev => { + return ev.target.id === id ? onClick(image) : null; + }; + + const handleLogoClick = ev => { + return onClick(image); + }; const Logo = Assets[pascalCase(imageName)] || Assets.Placeholder; return (