diff --git a/src/pages/ProjectList.js b/src/pages/ProjectList.js index 8ee0544..2a91491 100644 --- a/src/pages/ProjectList.js +++ b/src/pages/ProjectList.js @@ -372,16 +372,21 @@ class ProjectList extends Component { let projectsLFH = []; let projectIdeas = []; let otherProjects = []; + let myProjects = []; projects.forEach((p) => { + if (Object.keys(p.members || {}).includes(auth.uid)) myProjects.push(p); if (p.isIdea) projectIdeas.push(p); else if (p.needHelp) projectsLFH.push(p); else otherProjects.push(p); + }); const showParam = this.props.location.query.show; const showIdeas = !showParam || showParam === 'ideas'; const showProjects = showParam === 'projects'; + const showMyProjects = showParam === 'my-projects'; const hasAnyProjects = projectsLFH.length > 0 || otherProjects.length > 0; + const hasAnyMyProjects = myProjects.length > 0; const hasAnyIdeas = projectIdeas.length > 0; let userVotes = year ? getAuthUserVotes(auth.uid, year.votes) : []; @@ -402,6 +407,13 @@ class ProjectList extends Component { ); } + if (showMyProjects && !hasAnyMyProjects) { + emptyState = ( +