chore: formatting
This commit is contained in:
parent
f14e721caf
commit
b92d780cda
@ -1,5 +1,5 @@
|
|||||||
import { computed } from 'vue'
|
import {computed} from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type {Ref} from 'vue'
|
||||||
|
|
||||||
import {useTitle as useTitleVueUse, toRef} from '@vueuse/core'
|
import {useTitle as useTitleVueUse, toRef} from '@vueuse/core'
|
||||||
|
|
||||||
@ -9,12 +9,12 @@ export function useTitle(...args: UseTitleParameters) {
|
|||||||
|
|
||||||
const [newTitle, ...restArgs] = args
|
const [newTitle, ...restArgs] = args
|
||||||
|
|
||||||
const pageTitle = toRef(newTitle) as Ref<string>
|
const pageTitle = toRef(newTitle) as Ref<string>
|
||||||
|
|
||||||
const completeTitle = computed(() =>
|
const completeTitle = computed(() =>
|
||||||
(typeof pageTitle.value === 'undefined' || pageTitle.value === '')
|
(typeof pageTitle.value === 'undefined' || pageTitle.value === '')
|
||||||
? 'Vikunja'
|
? 'Vikunja'
|
||||||
: `${pageTitle.value} | Vikunja`,
|
: `${pageTitle.value} | Vikunja`,
|
||||||
)
|
)
|
||||||
|
|
||||||
return useTitleVueUse(completeTitle, ...restArgs)
|
return useTitleVueUse(completeTitle, ...restArgs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user