2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Fix onClick behaviour for details image

This commit is contained in:
Oliver
2024-02-29 04:28:45 +00:00
parent 05e67d310a
commit bfc613c9c7

View File

@ -337,15 +337,18 @@ export function DetailsImage(props: DetailImageProps) {
src={img} src={img}
height={IMAGE_DIMENSION} height={IMAGE_DIMENSION}
width={IMAGE_DIMENSION} width={IMAGE_DIMENSION}
/>
{permissions.hasChangeRole(props.appRole) && hovered && (
<Overlay
color="black"
opacity={0.8}
onClick={() => { onClick={() => {
modals.open({ modals.open({
children: <ApiImage src={img} />, children: <ApiImage src={img} />,
withCloseButton: false withCloseButton: false
}); });
}} }}
/> >
{permissions.hasChangeRole(props.appRole) && hovered && (
<Overlay color="black" opacity={0.8}>
<ImageActionButtons <ImageActionButtons
visible={hovered} visible={hovered}
actions={props.imageActions} actions={props.imageActions}