You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
Task: Fetch Current User's Data from
user/me
EndpointObjective:
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:
user/me
endpoint.name
,email
, etc.. Handle Errors:
Requirements:
Bonus Points:
The text was updated successfully, but these errors were encountered: