refactor(frontend): extract avatar image component

This commit is contained in:
sam 2024-10-01 14:44:34 +02:00
parent 562ecc46bd
commit b1165c3780
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
3 changed files with 31 additions and 13 deletions

View file

@ -0,0 +1,22 @@
export default function AvatarImage({
src,
width,
alt,
lazyLoad,
}: {
src: string;
width: number;
alt: string;
lazyLoad?: boolean;
}) {
return (
<img
src={src}
alt={alt}
width={width}
height={width}
className="rounded-circle img-fluid"
loading={lazyLoad ? "lazy" : "eager"}
/>
);
}