From 06891a361917e3374f7ce4e010ea95b052c61583 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 19 Dec 2025 21:11:36 +0100 Subject: [PATCH] style: Add wall clock time to session timeline --- src/components/SessionTimeline.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/SessionTimeline.tsx b/src/components/SessionTimeline.tsx index f41a73a..3ffce37 100644 --- a/src/components/SessionTimeline.tsx +++ b/src/components/SessionTimeline.tsx @@ -47,8 +47,10 @@ export default function SessionTimeline({ tastings, sessionStart }: SessionTimel return (
{sortedTastings.map((tasting, index) => { - const currentTime = new Date(tasting.tasted_at).getTime(); + const tastedDate = new Date(tasting.tasted_at); + const currentTime = tastedDate.getTime(); const diffMinutes = Math.round((currentTime - firstTastingTime) / (1000 * 60)); + const wallClockTime = tastedDate.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }); const isSmoky = checkIsSmoky(tasting); const wasPreviousSmoky = index > 0 && checkIsSmoky(sortedTastings[index - 1]); @@ -69,7 +71,7 @@ export default function SessionTimeline({ tastings, sessionStart }: SessionTimel
Dram #{index + 1} - {index === 0 ? 'Start' : `+${diffMinutes}m`} + {wallClockTime} ({index === 0 ? 'Start' : `+${diffMinutes}m`}) {isSmoky && ( Peat Bomb