summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-02-04 13:02:36 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-02-04 13:02:36 +0700
commit4e8fc0f09765cd90773fcef0cb483ca1872f2883 (patch)
treeb83781751bb4dfd275ba21ebf2b1221cc4b884af /src/components
parent61b5c173a37edf867a764cc965d950182b31b5b3 (diff)
no message
Diffstat (limited to 'src/components')
-rw-r--r--src/components/elements/Image.js21
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