This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/helpers/getProjectTitle.ts
kolaente 9241c7e587
Some checks failed
continuous-integration/drone/pr Build is failing
fix: lint
2023-04-18 12:21:12 +02:00

15 lines
328 B
TypeScript

import {i18n} from '@/i18n'
import type {IProject} from '@/modelTypes/IProject'
export function getProjectTitle(project: IProject) {
if (project.id === -1) {
return i18n.global.t('project.pseudo.favorites.title')
}
if (project.title === 'Inbox') {
return i18n.global.t('project.inboxTitle')
}
return project.title
}