From d00771b26d13051b1dc68ab6898f3dba2b908cba Mon Sep 17 00:00:00 2001 From: Yannick M <85898240+mugishayannick@users.noreply.github.com> Date: Fri, 8 Dec 2023 11:00:04 +0200 Subject: [PATCH] Fixed the empty project logic --- renderer/src/components/Projects/ProjectList.js | 2 +- renderer/src/components/Projects/ProjectRow.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/renderer/src/components/Projects/ProjectList.js b/renderer/src/components/Projects/ProjectList.js index ece2c0528..1bfd2bb9f 100644 --- a/renderer/src/components/Projects/ProjectList.js +++ b/renderer/src/components/Projects/ProjectList.js @@ -89,7 +89,7 @@ export default function ProjectList() { orderBy={orderBy} onRequestSort={handleRequestSort} /> - + {(!projects) &&
} diff --git a/renderer/src/components/Projects/ProjectRow.js b/renderer/src/components/Projects/ProjectRow.js index c1cee48b2..579e89578 100644 --- a/renderer/src/components/Projects/ProjectRow.js +++ b/renderer/src/components/Projects/ProjectRow.js @@ -59,9 +59,10 @@ const ProjectRow = ({ } return 0; } + return ( - {projects?.length === 0 && ( + {((projects?.length === 0 && filteredProjects.length > 0) || (!showArchived && projects.length === archivedProjects.length)) && (

You don't have any projects yet

@@ -87,12 +88,12 @@ const ProjectRow = ({ )} { - projects?.length !== 0 && filteredProjects?.length === 0 && ( - - -

No projects found. Try a different search term.

- - + projects.length > 0 && filteredProjects?.length === 0 && ( + + +

No projects found. Try a different search term.

+ + ) } {