vikunja-frontend/src/helpers/getNamespaceTitle.ts
Dominik Pschenitschni 1a11b43ca8 feat: improve models
2022-09-13 14:59:02 +00:00

15 lines
408 B
TypeScript

import {i18n} from '@/i18n'
import type {INamespace} from '@/modelTypes/INamespace'
export const getNamespaceTitle = (n: INamespace) => {
if (n.id === -1) {
return i18n.global.t('namespace.pseudo.sharedLists.title')
}
if (n.id === -2) {
return i18n.global.t('namespace.pseudo.favorites.title')
}
if (n.id === -3) {
return i18n.global.t('namespace.pseudo.savedFilters.title')
}
return n.title
}