Fix wrong links

This commit is contained in:
Lim Chee Aun 2023-02-09 17:41:42 +08:00
parent 17e28156db
commit 129417bad3
2 changed files with 2 additions and 8 deletions

View file

@ -259,13 +259,7 @@ function Status({
{size !== 'l' && {size !== 'l' &&
(uri ? ( (uri ? (
<Link <Link
to={ to={instance ? `/${instance}/s/${id}` : `/s/${id}`}
instance
? `
/s/${instance}/${id}
`
: `/s/${id}`
}
class="time" class="time"
> >
<Icon <Icon

View file

@ -46,7 +46,7 @@ function handleContentLinks(opts) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
const tag = target.innerText.replace(/^#/, '').trim(); 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 }); console.log({ hashURL });
location.hash = hashURL; location.hash = hashURL;
} }