AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Dynamically render cards that user has actual access to in profile screen #291

Open qisforq opened 1 month ago

qisforq commented 1 month ago

Objective:

Dynamically render the player cards that the user has actual access to in the profile screen.

Sub-tasks:

  1. Fetch the list of accessible player cards

    • [ ] Implement an API endpoint to retrieve the list of player cards that the user has access to
    • [ ] Include both the player cards owned by the user and the cards shared with the user as a guest
    • [ ] Optimize the database query to efficiently fetch the necessary data
  2. Update the profile screen component

    • [ ] Modify the profile screen component to fetch the list of accessible player cards from the API
    • [ ] Render the player cards dynamically based on the fetched data
    • [ ] Handle loading states and error scenarios gracefully
  3. Implement pagination or lazy loading

    • [ ] If the user has access to a large number of player cards, implement pagination or lazy loading to improve performance
    • [ ] Load a subset of player cards initially and load more as the user scrolls or navigates through the profile screen
    • [ ] Update the API endpoint to support pagination or lazy loading parameters
  4. Test and optimize

    • [ ] Conduct thorough testing of the profile screen to ensure that only the accessible player cards are rendered
    • [ ] Verify that the player cards are displayed correctly and the user can interact with them as expected
    • [ ] Optimize the performance by implementing caching mechanisms and minimizing unnecessary API calls
qisforq commented 1 month ago

REPEAT