refactor(frontend): extract avatar image component
This commit is contained in:
parent
562ecc46bd
commit
b1165c3780
3 changed files with 31 additions and 13 deletions
22
Foxnouns.Frontend/app/components/profile/AvatarImage.tsx
Normal file
22
Foxnouns.Frontend/app/components/profile/AvatarImage.tsx
Normal 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"}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue