frontend/src/helpers/getNamespaceTitle.ts

16 lines
411 B
TypeScript
Raw Normal View History

2021-08-20 13:38:16 +00:00
import {i18n} from '@/i18n'
2022-09-06 09:36:01 +00:00
import type {INamespace} from '@/modelTypes/INamespace'
2021-08-20 13:38:16 +00:00
2022-07-20 22:42:36 +00:00
export const getNamespaceTitle = (n: INamespace) => {
if (n.id === -1) {
return i18n.global.t('namespace.pseudo.sharedProjects.title')
}
if (n.id === -2) {
2021-08-20 13:38:16 +00:00
return i18n.global.t('namespace.pseudo.favorites.title')
}
if (n.id === -3) {
2021-08-20 13:38:16 +00:00
return i18n.global.t('namespace.pseudo.savedFilters.title')
}
2021-07-19 09:18:22 +00:00
return n.title
}