escape some to_do

This commit is contained in:
Romulus21
2024-02-17 00:08:30 +01:00
parent f27ffc1ce8
commit e191c84f29
2 changed files with 3 additions and 3 deletions

View File

@@ -31,8 +31,8 @@ const Tracker = () => {
return <div>
{currentTimeTracker
? <div className="flex gap-2">
<Link to={`/todos/${currentTimeTracker.to_do.id}`} className="font-bold">
{currentTimeTracker.to_do.name}
<Link to={`/todos/${currentTimeTracker?.to_do.id}`} className="font-bold">
{currentTimeTracker?.to_do.name}
</Link>
<span>{timer}</span>
<button onClick={stopCurrentTimeTrack} className="flex items-center">

View File

@@ -36,7 +36,7 @@ const TimeTrackersIndex = () => {
<span className="text-center w-36">{(new Date(tracker.end_at)).toSmallFrDate()}</span>
<span className={`flex-1 ${tracker.to_do.checked ? 'line-through' : ''}`}>{tracker.to_do.name}</span>
<span className="flex gap-2">
{!tracker.to_do.checked && <button className="cursor-pointer w-7 justify-center flex items-center"
{!tracker?.to_do.checked && <button className="cursor-pointer w-7 justify-center flex items-center"
type="button"
title="Commencer"
onClick={() => startTrackToDo(tracker.to_do)}>