adrianhajdin / zoom-clone

Learn to develop a professional enterprise-ready video conferencing app in hours using Next.js 14, Stream, and Tailwind CSS.
https://jsmastery.pro
957 stars 325 forks source link

Hardcoded Latest Upcoming Calls Info to Dynamic Real-Time Info #18

Closed tazheeb-shamsi closed 4 months ago

tazheeb-shamsi commented 4 months ago

image

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.