From e7054b1ff60aae39f255210ff0cfa2217e8d844c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly 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') 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 ( { rounded, className )} - src={src} + src={`${src}?v=${uniqueTimestamp}`} alt={alt} loading='lazy' quality={100} -- cgit v1.2.3