fix(topbar): settings link would 404

This commit is contained in:
Tom (plebeius.eth)
2024-05-31 11:36:37 +02:00
parent 9c9249da94
commit 1aff0d3ada
+3 -3
View File
@@ -32,8 +32,8 @@ const TopBarDesktop = () => {
{renderSubplebbits(interestsSubs)}] [{renderSubplebbits(randomSubs)}] [{renderSubplebbits(internationalSubs)}] {renderSubplebbits(interestsSubs)}] [{renderSubplebbits(randomSubs)}] [{renderSubplebbits(internationalSubs)}]
</span> </span>
<span className={styles.navTopRight}> <span className={styles.navTopRight}>
[<Link to={!location.pathname.endsWith('settings') ? location.pathname + '/settings' : location.pathname}>{t('settings')}</Link>] [<Link to='/'>{t('home')}</Link> [<Link to={!location.pathname.endsWith('settings') ? location.pathname.replace(/\/$/, '') + '/settings' : location.pathname}>{t('settings')}</Link>] [
] <Link to='/'>{t('home')}</Link>]
</span> </span>
</div> </div>
); );
@@ -94,7 +94,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {
{boardSelect} {boardSelect}
</div> </div>
<div className={styles.pageJump}> <div className={styles.pageJump}>
<Link to={useLocation().pathname + '/settings'}>{t('settings')}</Link> <Link to={useLocation().pathname.replace(/\/$/, '') + '/settings'}>{t('settings')}</Link>
<Link to='/'>{t('home')}</Link> <Link to='/'>{t('home')}</Link>
</div> </div>
</div> </div>