fix: fix issue where personal projects did not show up in Project Finder
This commit is contained in:
parent
978be2218d
commit
c4a80590a1
@ -134,6 +134,7 @@ const ProjectFinder = () => {
|
|||||||
}
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
const { projects, teams } = data;
|
const { projects, teams } = data;
|
||||||
|
const personalProjects = data.projects.filter(p => p.team === null);
|
||||||
const projectTeams = teams.map(team => {
|
const projectTeams = teams.map(team => {
|
||||||
return {
|
return {
|
||||||
id: team.id,
|
id: team.id,
|
||||||
@ -143,6 +144,22 @@ const ProjectFinder = () => {
|
|||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<TeamContainer>
|
||||||
|
<TeamTitle>Personal</TeamTitle>
|
||||||
|
<TeamProjects>
|
||||||
|
{personalProjects.map((project, idx) => (
|
||||||
|
<TeamProjectContainer key={project.id}>
|
||||||
|
<TeamProjectLink to={`/projects/${project.id}`}>
|
||||||
|
<TeamProjectBackground color={colors[idx % 5]} />
|
||||||
|
<TeamProjectAvatar color={colors[idx % 5]} />
|
||||||
|
<TeamProjectContent>
|
||||||
|
<TeamProjectTitle>{project.name}</TeamProjectTitle>
|
||||||
|
</TeamProjectContent>
|
||||||
|
</TeamProjectLink>
|
||||||
|
</TeamProjectContainer>
|
||||||
|
))}
|
||||||
|
</TeamProjects>
|
||||||
|
</TeamContainer>
|
||||||
{projectTeams.map(team => (
|
{projectTeams.map(team => (
|
||||||
<TeamContainer key={team.id}>
|
<TeamContainer key={team.id}>
|
||||||
<TeamTitle>{team.name}</TeamTitle>
|
<TeamTitle>{team.name}</TeamTitle>
|
||||||
|
Loading…
Reference in New Issue
Block a user