From e7054b1ff60aae39f255210ff0cfa2217e8d844c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 19 Jan 2024 13:45:56 +0700
Subject: Add unique timestamp on image component

---
 src-migrate/components/ui/image.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src-migrate/components/ui/image.tsx')

diff --git a/src-migrate/components/ui/image.tsx b/src-migrate/components/ui/image.tsx
index c1dde170..a65d4ec7 100644
--- a/src-migrate/components/ui/image.tsx
+++ b/src-migrate/components/ui/image.tsx
@@ -11,6 +11,8 @@ const Image = (props: ImageProps) => {
   const { alt, src, className, rounded, ...rest } = props;
   const [isLoading, setLoading] = useState(true);
 
+  const uniqueTimestamp = new Date().getTime();
+
   return (
     <NextImage
       className={clsxm(
@@ -21,7 +23,7 @@ const Image = (props: ImageProps) => {
         rounded,
         className
       )}
-      src={src}
+      src={`${src}?v=${uniqueTimestamp}`}
       alt={alt}
       loading='lazy'
       quality={100}
-- 
cgit v1.2.3

