setImageError(true)} />;
}
// Anything else: Show box
@@ -376,14 +377,19 @@ const Attachment = (props) => {
const Image = (props) => {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
+ const [loaded, setLoaded] = useState(false);
return (
- <>
+
setOpen(true)}
+ onLoad={() => setLoaded(true)}
+ onError={props.onError}
sx={{
marginTop: 2,
borderRadius: "4px",
@@ -413,7 +419,7 @@ const Image = (props) => {
/>
- >
+
);
};