diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d669276..4d27030 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -7093,31 +7093,24 @@ function App() { ) : null} -
- {[...weights] - .sort((left, right) => right.recordedOn.localeCompare(left.recordedOn)) - .map((weight) => { - const weightCanBeEdited = isWeightEditable(weight); - - return ( -
- {formatWeight(weight.weightGrams)} - {formatDate(weight.recordedOn)} - {weight.notes || 'No notes recorded.'} - {weightCanBeEdited ? ( -
- -
- ) : ( - Editing available for the last 3 days only. - )} -
- ); - })} - {!weights.length ?

No weight entries recorded yet.

: null} -
+
+ {[...weights] + .filter(isWeightEditable) + .sort((left, right) => right.recordedOn.localeCompare(left.recordedOn)) + .map((weight) => ( +
+ {formatWeight(weight.weightGrams)} + {formatDate(weight.recordedOn)} + {weight.notes || 'No notes recorded.'} +
+ +
+
+ ))} + {!weights.some(isWeightEditable) ?

No editable weight entries from the last 3 days.

: null} +
) : null}