fix: current nav side on pwa update (#823)

This commit is contained in:
Joaquín Sánchez 2023-01-06 13:47:49 +01:00 committed by GitHub
parent 37fa2b9117
commit 18056038c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,13 +30,11 @@ useCommand({
let activeClass = $ref('text-primary')
onMastoInit(async () => {
if (!props.userOnly) {
// TODO: force NuxtLink to reevaluate, we now we are in this route though, so we should force it to active
// we don't have currentServer defined until later
activeClass = ''
await nextTick()
activeClass = 'text-primary'
}
})
// Optimize rendering for the common case of being logged in, only show visual feedback for disabled user-only items