diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-04 13:02:36 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-04 13:02:36 +0700 |
| commit | 4e8fc0f09765cd90773fcef0cb483ca1872f2883 (patch) | |
| tree | b83781751bb4dfd275ba21ebf2b1221cc4b884af /src/components | |
| parent | 61b5c173a37edf867a764cc965d950182b31b5b3 (diff) | |
no message
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/elements/Image.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/components/elements/Image.js b/src/components/elements/Image.js index e85237ed..26e85bee 100644 --- a/src/components/elements/Image.js +++ b/src/components/elements/Image.js @@ -1,13 +1,18 @@ -import { LazyLoadImage } from "react-lazy-load-image-component"; -import 'react-lazy-load-image-component/src/effects/opacity.css'; +import NextImage from "next/image"; +import { LazyLoadComponent } from "react-lazy-load-image-component"; export default function Image({ src, alt, className = "" }) { return ( - <LazyLoadImage - effect="opacity" - src={src || '/images/noimage.jpeg'} - alt={src ? alt : 'Image Not Found - Indoteknik'} - className={className} - /> + <LazyLoadComponent> + <div className="w-full h-full flex justify-center items-center"> + <NextImage + src={src || '/images/noimage.jpeg'} + alt={src ? alt : 'Image Not Found - Indoteknik'} + width={512} + height={512} + className={className} + /> + </div> + </LazyLoadComponent> ); }
\ No newline at end of file |
