chore: cleanup isHydrated (#2614)

Co-authored-by: patak <583075+patak-dev@users.noreply.github.com>
This commit is contained in:
Joaquín Sánchez 2024-02-24 19:24:19 +01:00 committed by GitHub
parent 6b40319723
commit eddbb1eee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View file

@ -19,21 +19,21 @@ const userSettings = useUserSettings()
const tabs = computed<CommonRouteTabOption[]>(() => [
{
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
display: isHydrated.value ? t('tab.posts') : '',
display: t('tab.posts'),
},
{
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
display: isHydrated.value ? t('tab.hashtags') : '',
display: t('tab.hashtags'),
},
{
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
display: isHydrated.value ? t('tab.news') : '',
display: t('tab.news'),
hide: userSettings.value.preferences.hideNews,
},
// This section can only be accessed after logging in
{
to: isHydrated.value ? `/${currentServer.value}/explore/users` : '/explore/users',
display: isHydrated.value ? t('tab.for_you') : '',
display: t('tab.for_you'),
disabled: !isHydrated.value || !currentUser.value,
},
])