diff --git a/src/components/Routines/screens/Detail/RoutineDetailsTable.tsx b/src/components/Routines/screens/Detail/RoutineDetailsTable.tsx
index 067df9c4..41bc36b1 100644
--- a/src/components/Routines/screens/Detail/RoutineDetailsTable.tsx
+++ b/src/components/Routines/screens/Detail/RoutineDetailsTable.tsx
@@ -259,6 +259,24 @@ export const RoutineTable = (props: {
}
+ function renderLoggedValueWithIcon(
+ value: React.ReactNode,
+ icon: React.ReactNode,
+ ) {
+ return (
+
+ {value}
+ {icon}
+
+ );
+ }
+
function getTableRowLogged(slotEntry: SlotEntry, day: Day) {
return
@@ -275,40 +293,40 @@ export const RoutineTable = (props: {
{logs.map((log) =>
-
- {log.repetitions ?? '-/-'}
- {getComparisonIcon(log.repetitions, setConfig?.repetitions, setConfig?.maxRepetitions)}
-
+ {renderLoggedValueWithIcon(
+ log.repetitions ?? '-/-',
+ getComparisonIcon(log.repetitions, setConfig?.repetitions, setConfig?.maxRepetitions),
+ )}
)}
{logs.map((log) =>
-
- {log.weight ?? '-/-'}
- {getComparisonIcon(log.weight, setConfig?.weight, setConfig?.maxWeight)}
-
+ {renderLoggedValueWithIcon(
+ log.weight ?? '-/-',
+ getComparisonIcon(log.weight, setConfig?.weight, setConfig?.maxWeight),
+ )}
)}
{logs.map((log) =>
-
- {log.restTime ?? '-/-'}
- {getComparisonIcon(log.restTime, setConfig?.restTime, setConfig?.maxRestTime)}
-
+ {renderLoggedValueWithIcon(
+ log.restTime ?? '-/-',
+ getComparisonIcon(log.restTime, setConfig?.restTime, setConfig?.maxRestTime),
+ )}
)}
{logs.map((log) =>
-
- {log.rir ?? '-/-'}
- {getComparisonIcon(log.rir, setConfig?.rir, setConfig?.maxRir, false)}
-
+ {renderLoggedValueWithIcon(
+ log.rir ?? '-/-',
+ getComparisonIcon(log.rir, setConfig?.rir, setConfig?.maxRir, false),
+ )}
)}