Skip to content

Conversation

@thoothe
Copy link

@thoothe thoothe commented Sep 18, 2024

Dynamic Data Loading:

Replaced static data import with dynamic fetching from Firebase using a callable function.
Integrated caching to store fetched data in localStorage and reduce redundant API calls.

Caching Mechanism:

Implemented caching using localStorage with a validity period of 1 hour.
Data is cached along with an expiry timestamp to ensure it is refreshed periodically.
State Management:

Utilized React useState and useEffect hooks to manage component state, including loading, data, and error states.
Error Handling and Loading States:

Added error handling to display a message if the API call fails.
Included a loading state message while data is being fetched.
Data Handling and Rendering:

Updated the component to handle dynamic team members data, including image URLs and roles.
Implemented logic to display placeholder images if the actual image URL is not available.
UI and Button Logic:

Adjusted the UI to reflect dynamic data and updated button logic based on the number of team members.
Testing and Debugging:

Added console logs for debugging purposes to verify the correctness of data fetching and rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant