add duration

This commit is contained in:
Romulus21
2024-02-15 23:09:13 +01:00
parent b326f79f2d
commit 335fc8b12b
5 changed files with 42 additions and 3 deletions

View File

@@ -57,8 +57,9 @@ const ToDoIndex: FC<ToDoIndexProps> = ({reload, setReload}) => {
onChange={() =>toggleCheck(toDo)}
className=""/>
<Link to={"/todos/" + toDo.id}
className={`${toDo.checked ? 'line-through' : ''} flex-1`}>
{toDo.name}
className={`${toDo.checked ? 'line-through' : ''} flex-1 flex justify-between`}>
<span>{toDo.name}</span>
<span className="text-gray-400 text-md mr-2">{toDo.duration} s</span>
</Link>
{!toDo.checked && <span className="cursor-pointer flex items-center"
title="Commencer"

View File

@@ -4,6 +4,8 @@ export interface toDo {
name: string,
checked: string|null,
description?: string,
duration: number,
position: number,
}
export interface timeTracker {