Bring back the instance

This commit is contained in:
Lim Chee Aun 2023-04-17 17:38:53 +08:00
parent 52c66182d1
commit 9fd2b05065

View file

@ -141,14 +141,14 @@ export const SHORTCUTS_META = {
public: { public: {
id: 'public', id: 'public',
title: ({ local }) => (local ? 'Local' : 'Federated'), title: ({ local }) => (local ? 'Local' : 'Federated'),
subtitle: ({ instance }) => instance, subtitle: ({ instance }) => instance || api().instance,
path: ({ local, instance }) => `/${instance}/p${local ? '/l' : ''}`, path: ({ local, instance }) => `/${instance}/p${local ? '/l' : ''}`,
icon: ({ local }) => (local ? 'group' : 'earth'), icon: ({ local }) => (local ? 'group' : 'earth'),
}, },
trending: { trending: {
id: 'trending', id: 'trending',
title: 'Trending', title: 'Trending',
subtitle: ({ instance }) => instance, subtitle: ({ instance }) => instance || api().instance,
path: ({ instance }) => `/${instance}/trending`, path: ({ instance }) => `/${instance}/trending`,
icon: 'chart', icon: 'chart',
}, },
@ -187,7 +187,7 @@ export const SHORTCUTS_META = {
hashtag: { hashtag: {
id: 'hashtag', id: 'hashtag',
title: ({ hashtag }) => hashtag, title: ({ hashtag }) => hashtag,
subtitle: ({ instance }) => instance, subtitle: ({ instance }) => instance || api().instance,
path: ({ hashtag, instance }) => path: ({ hashtag, instance }) =>
`${instance ? `/${instance}` : ''}/t/${hashtag.split(/\s+/).join('+')}`, `${instance ? `/${instance}` : ''}/t/${hashtag.split(/\s+/).join('+')}`,
icon: 'hashtag', icon: 'hashtag',