From 9a7ab172acf1ee9828f1e2384e02c15e98460103 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sat, 12 Jul 2025 19:24:49 -0400 Subject: [PATCH] style: update color properties in TimerDetails component for consistency --- src/views/ChoreEdit/TimePassedCard.jsx | 32 +++++++++++++++++++++++++- src/views/Timer/TimerDetails.jsx | 8 +++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/views/ChoreEdit/TimePassedCard.jsx b/src/views/ChoreEdit/TimePassedCard.jsx index ae2a195..e1d5a0c 100644 --- a/src/views/ChoreEdit/TimePassedCard.jsx +++ b/src/views/ChoreEdit/TimePassedCard.jsx @@ -1,8 +1,16 @@ -import { Flag, Pause, PlayArrow, Schedule } from '@mui/icons-material' +import { + Flag, + OpenInFull, + Pause, + PlayArrow, + Schedule, +} from '@mui/icons-material' import { Box, Card, Chip, Typography } from '@mui/joy' import { useEffect, useRef, useState } from 'react' +import { useNavigate } from 'react-router-dom' const TimePassedCard = ({ chore, handleAction, onShowDetails }) => { + const navigate = useNavigate() const [time, setTime] = useState(0) const [shouldAnimate, setShouldAnimate] = useState(false) const [prevStatus, setPrevStatus] = useState(null) // Initialize as null @@ -96,8 +104,30 @@ const TimePassedCard = ({ chore, handleAction, onShowDetails }) => { }, }, transition: 'all 0.3s ease', + cursor: 'pointer', + }} + onClick={e => { + // if this click on this element itself and not its children: + if (e.target !== e.currentTarget) return + navigate('./timer') }} > + { + e.stopPropagation() + navigate('./timer') + }} + > { { { {