This PR refactors the Home component to replace the hardcoded logic for displaying the latest upcoming calls/meetings with a dynamic approach that fetches real-time data. This ensures the displayed information is always up-to-date.
Changes Made:
Refactored the Home component to use the useGetCalls hook to fetch real-time data for upcoming calls.
Sorted the fetched calls to determine the latest upcoming call.
Added logic to handle cases where there are no upcoming calls/meetings.
Improved the date and time formatting to ensure consistent display.
Before:
The upcoming calls/meetings were hardcoded, resulting in static and outdated information being displayed.
After:
The upcoming calls/meetings are fetched dynamically, ensuring the latest real-time data is always displayed.
This PR refactors the Home component to replace the hardcoded logic for displaying the latest upcoming calls/meetings with a dynamic approach that fetches real-time data. This ensures the displayed information is always up-to-date.
Changes Made:
Refactored the Home component to use the useGetCalls hook to fetch real-time data for upcoming calls. Sorted the fetched calls to determine the latest upcoming call. Added logic to handle cases where there are no upcoming calls/meetings. Improved the date and time formatting to ensure consistent display.
Before:
The upcoming calls/meetings were hardcoded, resulting in static and outdated information being displayed.
After:
The upcoming calls/meetings are fetched dynamically, ensuring the latest real-time data is always displayed.