mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix assets paths and remove cache busters
This commit is contained in:
@@ -10,8 +10,7 @@ const totalBanners = 57;
|
|||||||
const ImageBanner = () => {
|
const ImageBanner = () => {
|
||||||
const [imagePath] = useState(() => {
|
const [imagePath] = useState(() => {
|
||||||
const randomBannerIndex = Math.floor(Math.random() * totalBanners) + 1;
|
const randomBannerIndex = Math.floor(Math.random() * totalBanners) + 1;
|
||||||
const cacheBuster = new Date().getTime();
|
return `/assets/banners/banner-${randomBannerIndex}.jpg`;
|
||||||
return `assets/banners/banner-${randomBannerIndex}.jpg?cacheBuster=${cacheBuster}`;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return <img src={imagePath} alt='' />;
|
return <img src={imagePath} alt='' />;
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ const PostInfo = ({ openReplyModal, post, roles }: PostProps) => {
|
|||||||
)}
|
)}
|
||||||
{pinned && (
|
{pinned && (
|
||||||
<span className={`${styles.stickyIconWrapper} ${!locked && styles.addPaddingBeforeReply}`}>
|
<span className={`${styles.stickyIconWrapper} ${!locked && styles.addPaddingBeforeReply}`}>
|
||||||
<img src='assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
<img src='/assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{locked && (
|
{locked && (
|
||||||
<span className={`${styles.closedIconWrapper} ${styles.addPaddingBeforeReply} ${pinned && styles.addPaddingInBetween}`}>
|
<span className={`${styles.closedIconWrapper} ${styles.addPaddingBeforeReply} ${pinned && styles.addPaddingInBetween}`}>
|
||||||
<img src='assets/icons/closed.gif' alt='' className={styles.closedIcon} title={t('closed')} />
|
<img src='/assets/icons/closed.gif' alt='' className={styles.closedIcon} title={t('closed')} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!isInPostView && !isReply && (
|
{!isInPostView && !isReply && (
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ const PostInfoAndMedia = ({ openReplyModal, post, roles }: PostProps) => {
|
|||||||
{!(isDescription || isRules) && <span className={styles.address}>(u/{shortAddress || accountShortAddress})</span>}
|
{!(isDescription || isRules) && <span className={styles.address}>(u/{shortAddress || accountShortAddress})</span>}
|
||||||
{pinned && (
|
{pinned && (
|
||||||
<span className={styles.stickyIconWrapper}>
|
<span className={styles.stickyIconWrapper}>
|
||||||
<img src='assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
<img src='/assets/icons/sticky.gif' alt='' className={styles.stickyIcon} title={t('sticky')} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{locked && (
|
{locked && (
|
||||||
<span className={`${styles.closedIconWrapper} ${pinned && styles.addPaddingInBetween}`}>
|
<span className={`${styles.closedIconWrapper} ${pinned && styles.addPaddingInBetween}`}>
|
||||||
<img src='assets/icons/closed.gif' alt='' className={styles.closedIcon} title={t('closed')} />
|
<img src='/assets/icons/closed.gif' alt='' className={styles.closedIcon} title={t('closed')} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{title && (
|
{title && (
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ const totalNotFoundImages = 2;
|
|||||||
const NotFoundImage = () => {
|
const NotFoundImage = () => {
|
||||||
const [imagePath] = useState(() => {
|
const [imagePath] = useState(() => {
|
||||||
const randomBannerIndex = Math.floor(Math.random() * totalNotFoundImages) + 1;
|
const randomBannerIndex = Math.floor(Math.random() * totalNotFoundImages) + 1;
|
||||||
const cacheBuster = new Date().getTime();
|
return `/assets/not-found/not-found-${randomBannerIndex}.jpg`;
|
||||||
return `assets/not-found/not-found-${randomBannerIndex}.jpg?cacheBuster=${cacheBuster}`;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return <img src={imagePath} alt='' />;
|
return <img src={imagePath} alt='' />;
|
||||||
|
|||||||
Reference in New Issue
Block a user