summaryrefslogtreecommitdiff
path: root/src/components/elements/Image.js
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-02-06 12:04:30 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-02-06 12:04:30 +0700
commit620223f151700bbd91a33d32e2a4c29d4c287e9d (patch)
tree8151774bc1f595fcc688b376e1e0c710efe3bf2e /src/components/elements/Image.js
parentdfff0da443a3e2d92b92c7c1632ca16e1da94e61 (diff)
no message
Diffstat (limited to 'src/components/elements/Image.js')
-rw-r--r--src/components/elements/Image.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/components/elements/Image.js b/src/components/elements/Image.js
index 1fedf61c..8981547a 100644
--- a/src/components/elements/Image.js
+++ b/src/components/elements/Image.js
@@ -1,18 +1,13 @@
-import NextImage from "next/image";
-import { LazyLoadComponent } from "react-lazy-load-image-component";
+import { LazyLoadImage } from "react-lazy-load-image-component";
+import "react-lazy-load-image-component/src/effects/opacity.css";
export default function Image({ src, alt, className = "" }) {
return (
- <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={1024}
- height={1024}
- className={className}
- />
- </div>
- </LazyLoadComponent>
+ <LazyLoadImage
+ effect="opacity"
+ src={src || '/images/noimage.jpeg'}
+ alt={src ? alt : 'Image Not Found - Indoteknik'}
+ className={className}
+ />
);
} \ No newline at end of file