Symptom
When the user changes the workout filter (e.g. search text, exercise type, date range), the displayed workouts never update. The list always shows results matching the initial filter. Only clicking the "Refresh" button re-fetches data — but even then, it uses the old filter.
Expected
Changing any filter field should trigger a new fetch with the updated filter values.
What you know
The useWorkouts hook accepts a filter object and uses it inside a useEffect to fetch workouts from an API. The effect has a dependency array, but the workouts never change when the filter changes.
Hints
TypeScript
TypeScript ready
Test Output
▶
Click "Run Tests" to execute your code