Update hide description
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing

This commit is contained in:
Kasper Juul Hermansen 2021-11-18 17:03:03 +01:00
parent a9cabae65e
commit de551a0608
Signed by: kjuulh
GPG Key ID: DCD9397082D97069
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import { useUpdateTodoState } from "@src/presentation/hooks/socketHooks";
export const TodoList = (props: { export const TodoList = (props: {
todos: Todo[]; todos: Todo[];
hideDone: boolean; hideDone: boolean;
hideProject: boolean;
project: string; project: string;
}) => { }) => {
const { updateTodoState } = useUpdateTodoState(); const { updateTodoState } = useUpdateTodoState();
@ -22,7 +23,7 @@ export const TodoList = (props: {
updateTodo={(todo) => { updateTodo={(todo) => {
updateTodoState(todo.id, todo.status); updateTodoState(todo.id, todo.status);
}} }}
displayProject displayProject={!props.hideProject}
/> />
</li> </li>
))} ))}

View File

@ -34,7 +34,7 @@ const HomePage = () => {
{groupedTodos["inbox"] && ( {groupedTodos["inbox"] && (
<div className="space-y-2"> <div className="space-y-2">
<PageHeading title="Inbox" /> <PageHeading title="Inbox" />
<TodoList todos={groupedTodos["inbox"]} hideDone project={""} /> <TodoList todos={groupedTodos["inbox"]} hideDone project={""} hideProject={false} />
</div> </div>
)} )}
{sections && {sections &&
@ -45,6 +45,7 @@ const HomePage = () => {
todos={groupedTodos[section]} todos={groupedTodos[section]}
hideDone hideDone
project={section} project={section}
hideProject
/> />
</div> </div>
))} ))}