From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 17 Feb 2023 17:07:50 +0700
Subject: Refactor

---
 src/core/components/elements/Image/Image.jsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/core/components/elements/Image/Image.jsx

(limited to 'src/core/components/elements/Image/Image.jsx')

diff --git a/src/core/components/elements/Image/Image.jsx b/src/core/components/elements/Image/Image.jsx
new file mode 100644
index 00000000..be2866e7
--- /dev/null
+++ b/src/core/components/elements/Image/Image.jsx
@@ -0,0 +1,15 @@
+import { LazyLoadImage } from "react-lazy-load-image-component"
+import "react-lazy-load-image-component/src/effects/opacity.css"
+
+const Image = ({ ...props }) => (
+  <LazyLoadImage
+    { ...props }
+    effect="opacity"
+    src={props.src || '/images/noimage.jpeg'}
+    alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
+  />
+)
+
+Image.defaultProps = LazyLoadImage.defaultProps
+
+export default Image
\ No newline at end of file
-- 
cgit v1.2.3

