Fix navigate not working

pull/228/head
Lim Chee Aun 2023-10-01 14:38:28 +08:00
rodzic 359fd92ae0
commit baa2605d27
1 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -258,11 +258,14 @@ function Hashtags({ columnMode, ...props }) {
onClick={(e) => {
hashtags.splice(i, 1);
hashtags.sort();
navigate(
instance
? `/${instance}/t/${hashtags.join('+')}`
: `/t/${hashtags.join('+')}`,
);
// navigate(
// instance
// ? `/${instance}/t/${hashtags.join('+')}`
// : `/t/${hashtags.join('+')}`,
// );
location.hash = instance
? `/${instance}/t/${hashtags.join('+')}`
: `/t/${hashtags.join('+')}`;
}}
>
<Icon icon="x" alt="Remove hashtag" class="danger-icon" />
@ -317,7 +320,8 @@ function Hashtags({ columnMode, ...props }) {
}
if (newInstance) {
newInstance = newInstance.toLowerCase().trim();
navigate(`/${newInstance}/t/${hashtags.join('+')}`);
// navigate(`/${newInstance}/t/${hashtags.join('+')}`);
location.hash = `/${newInstance}/t/${hashtags.join('+')}`;
}
}}
>