From 129417bad340c95efcbf926f7b104ca9e37c205a Mon Sep 17 00:00:00 2001 From: Lim Chee Aun <cheeaun@gmail.com> Date: Thu, 9 Feb 2023 17:41:42 +0800 Subject: [PATCH] Fix wrong links --- src/components/status.jsx | 8 +------- src/utils/handle-content-links.js | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 45022ed2..2b424af8 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -259,13 +259,7 @@ function Status({ {size !== 'l' && (uri ? ( <Link - to={ - instance - ? ` - /s/${instance}/${id} - ` - : `/s/${id}` - } + to={instance ? `/${instance}/s/${id}` : `/s/${id}`} class="time" > <Icon diff --git a/src/utils/handle-content-links.js b/src/utils/handle-content-links.js index 62c7c3f3..a91e4ec3 100644 --- a/src/utils/handle-content-links.js +++ b/src/utils/handle-content-links.js @@ -46,7 +46,7 @@ function handleContentLinks(opts) { e.preventDefault(); e.stopPropagation(); const tag = target.innerText.replace(/^#/, '').trim(); - const hashURL = instance ? `#/t/${instance}/${tag}` : `#/t/${tag}`; + const hashURL = instance ? `#/${instance}/t/${tag}` : `#/t/${tag}`; console.log({ hashURL }); location.hash = hashURL; }