From 7dca5bd01da95d0b68cd48d640119ee141534cd5 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Wed, 29 May 2024 15:53:41 +0200 Subject: [PATCH] fix assets paths and remove cache busters --- src/components/board-banner/board-banner.tsx | 3 +-- src/components/post/post-desktop/post-desktop.tsx | 4 ++-- src/components/post/post-mobile/post-mobile.tsx | 4 ++-- src/views/not-found/not-found.tsx | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/board-banner/board-banner.tsx b/src/components/board-banner/board-banner.tsx index f04ff400..ec4b7026 100644 --- a/src/components/board-banner/board-banner.tsx +++ b/src/components/board-banner/board-banner.tsx @@ -10,8 +10,7 @@ const totalBanners = 57; const ImageBanner = () => { const [imagePath] = useState(() => { const randomBannerIndex = Math.floor(Math.random() * totalBanners) + 1; - const cacheBuster = new Date().getTime(); - return `assets/banners/banner-${randomBannerIndex}.jpg?cacheBuster=${cacheBuster}`; + return `/assets/banners/banner-${randomBannerIndex}.jpg`; }); return ; diff --git a/src/components/post/post-desktop/post-desktop.tsx b/src/components/post/post-desktop/post-desktop.tsx index b65e8eee..a74f8256 100644 --- a/src/components/post/post-desktop/post-desktop.tsx +++ b/src/components/post/post-desktop/post-desktop.tsx @@ -82,12 +82,12 @@ const PostInfo = ({ openReplyModal, post, roles }: PostProps) => { )} {pinned && ( - + )} {locked && ( - + )} {!isInPostView && !isReply && ( diff --git a/src/components/post/post-mobile/post-mobile.tsx b/src/components/post/post-mobile/post-mobile.tsx index ec01f7c9..4c7128d9 100644 --- a/src/components/post/post-mobile/post-mobile.tsx +++ b/src/components/post/post-mobile/post-mobile.tsx @@ -55,12 +55,12 @@ const PostInfoAndMedia = ({ openReplyModal, post, roles }: PostProps) => { {!(isDescription || isRules) && (u/{shortAddress || accountShortAddress})} {pinned && ( - + )} {locked && ( - + )} {title && ( diff --git a/src/views/not-found/not-found.tsx b/src/views/not-found/not-found.tsx index 150ef906..7e206fe8 100644 --- a/src/views/not-found/not-found.tsx +++ b/src/views/not-found/not-found.tsx @@ -10,8 +10,7 @@ const totalNotFoundImages = 2; const NotFoundImage = () => { const [imagePath] = useState(() => { const randomBannerIndex = Math.floor(Math.random() * totalNotFoundImages) + 1; - const cacheBuster = new Date().getTime(); - return `assets/not-found/not-found-${randomBannerIndex}.jpg?cacheBuster=${cacheBuster}`; + return `/assets/not-found/not-found-${randomBannerIndex}.jpg`; }); return ;