Description
This PR implements a new thunk to refresh the user's avatar when it is expired. The function is triggered when the user opens the app or reloads it.
The idea is:
- Get the stored user data.
- Check the expiration date of the avatar:
- If the avatar is expired, refresh the avatar URL and download the new blob.
- If the avatar is still valid, use the cached blob.
By doing this, we ensure the app always has a valid avatar URL and a working blob to display the user's profile image properly.
Related Issues
Related Pull Requests
Checklist
- Changes have been tested locally.
- Unit tests have been written or updated as necessary.
- The code adheres to the repository's coding standards.
- Relevant documentation has been added or updated.
- No new warnings or errors have been introduced.
- SonarCloud issues have been reviewed and addressed.
- QA Passed