Skip to content

Commit 07c59a6

Browse files
committed
fix: Fixed rounding of summed weekly time
1 parent 732ea6f commit 07c59a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/time/TimeEntryList.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ const TimeEntryList = ({ entries }: PropTypes) => {
5555
<svg aria-hidden="true" className="mr-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
5656
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clipRule="evenodd"></path>
5757
</svg>
58-
{groupedEntries.filter((entries) => days.find((d) => d.getTime() === entries.date.getTime())).reduce((sum, entry) => sum + entry.hours, 0)} h
58+
{groupedEntries
59+
.filter((entries) => days.find((d) => d.getTime() === entries.date.getTime()))
60+
.reduce((sum, entry) => sum + entry.hours, 0)
61+
.toFixed(2)}{" "}
62+
h
5963
</span>
6064
</div>
6165
{days.map((d, i) => {

0 commit comments

Comments
 (0)