1
0

chore: refactor get parents project and move to projects store

This commit is contained in:
kolaente
2023-03-28 21:28:29 +02:00
parent 6a8c656dbb
commit c32a198a34
4 changed files with 27 additions and 26 deletions

View File

@ -13,16 +13,3 @@ export function getProjectTitle(project: IProject) {
return project.title
}
export function getParentProjects(project: IProject, projectStore): IProject[] {
let parents = []
if (project.parentProjectId) {
const parentProject = projectStore.getProjectById(project.parentProjectId)
parents = getParentProjects(parentProject, projectStore)
}
return [
...parents,
project,
]
}