Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Frontend #32

Open
ArslanKamchybekov opened this issue Oct 12, 2024 · 0 comments
Open

Profile Frontend #32

ArslanKamchybekov opened this issue Oct 12, 2024 · 0 comments
Assignees

Comments

@ArslanKamchybekov
Copy link
Collaborator

Task: Fetch Current User's Data from user/me Endpoint

Objective:

You are tasked with fetching the current user's data by making a call to the user/me endpoint. The fetched data should then be displayed, including all user fields (such as name, email, etc.) and the IDs of the user's saved insurances and services.

Instructions:

  1. API Call:
    • Implement the logic to make a GET request to the user/me endpoint.
    • Retrieve all user details, which could include fields such as name, email, etc.
    • Also retrieve and display the IDs of the user's saved insurances and services in their corresponding components.
      . Handle Errors:
    • Implement proper error handling in case the API request fails (e.g., display an error message to the user).
    • If no saved insurances or services exist, display a message stating that none are found.

Requirements:

  • Ensure proper handling of authentication (e.g., include any required tokens in the request headers).
  • Fetch and display all user data fields.
  • Display the IDs of saved insurances and services, or an appropriate message if none are saved.

Bonus Points:

  • Add a loading spinner or some visual cue while the data is being fetched.
  • Implement pagination or lazy-loading if the user has a large number of saved insurances or services.
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

No branches or pull requests

2 participants