mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 00:33:59 +00:00
fix: proreply reseting user reviews on profile changing
This commit is contained in:
@@ -108,6 +108,14 @@ export function ProfileContent() {
|
||||
}
|
||||
}, [sortBy, getUserLibraryGames, userProfile]);
|
||||
|
||||
// Clear reviews state and reset tab when switching users
|
||||
useEffect(() => {
|
||||
setReviews([]);
|
||||
setReviewsTotalCount(0);
|
||||
setIsLoadingReviews(false);
|
||||
setActiveTab("library");
|
||||
}, [userProfile?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (userProfile?.id) {
|
||||
fetchUserReviews();
|
||||
|
||||
Reference in New Issue
Block a user