hiento09 86f0ffc7d1
Chore/disable submodule (#56)
* Chore disable git submodule for web-client and app-backend

* Chore add newest source code of app-backend and web-client

---------

Co-authored-by: Hien To <tominhhien97@gmail.com>
2023-09-05 16:29:07 +07:00

34 lines
534 B
TypeScript

import React from "react";
type Props = {
imageUrl: string;
className?: string;
alt?: string;
width?: number;
height?: number;
};
const JanImage: React.FC<Props> = ({
imageUrl,
className = "",
alt = "",
width,
height,
}) => {
const [attempt, setAttempt] = React.useState(0);
return (
<img
width={width}
height={height}
src={imageUrl}
alt={alt}
className={className}
key={attempt}
onError={() => setAttempt(attempt + 1)}
/>
);
};
export default JanImage;