Refactor: Add dependencies to useEffect in Profile component

This commit is contained in:
ALi Josheghani
2024-09-14 22:02:43 +03:30
parent 6282e7a9a7
commit c50b1346fe

View File

@@ -66,7 +66,7 @@ const Profile = () => {
} else {
console.error("Track ID is missing or invalid.");
}
}, []);
}, [mutation,query]);
const { data, isLoading, isFetching, error } = useQuery({
queryKey: ["profile", mutation],