Remove unused sections

This commit is contained in:
Kasper Juul Hermansen 2021-11-18 23:20:44 +01:00
parent 6c161843e5
commit 2506324cfd
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23

View File

@ -31,17 +31,21 @@ const HomePage = () => {
</div>
)}
{sections &&
sections.map((section) => (
<div key={section} className="space-y-2">
<ProjectsHeading title={section} />
<TodoList
todos={groupedTodos[section]}
hideDone
project={section}
hideProject
/>
</div>
))}
sections.map(
(section) =>
groupedTodos[section].filter((t) => t.status !== true).length !==
0 && (
<div key={section} className="space-y-2">
<ProjectsHeading title={section} />
<TodoList
todos={groupedTodos[section]}
hideDone
project={section}
hideProject
/>
</div>
)
)}
{data && data.length === 0 && (
<div className="space-y-4">
<PageHeading title="You're done!" />