This component handles exercise tracking and saving the data in db.
It fetches exercise data from external APIs, allowing users to select an exercise and input the duration. It calculates the calories burned based on the exercise and duration through an api call which uses exercise name as query(later on we will pass weight, height, age as well for the request to get more accurate calories burned), saving the exercise data to the backend server.
Completed exercises for the current date and a summary of the total duration and calories burned is also displayed once user adds it.
Error checking giving enough user feedback is implemented, checking for empty exercise selection and making sure that duration is greater than 0 minutes.