mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
fix: following state not right sometimes
This commit is contained in:
@@ -22,13 +22,13 @@ export default function FollowButton(props: Props) {
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (followingData) {
|
||||
if (!isLoadingFollowing && followingData) {
|
||||
setFollowing(followingData.following);
|
||||
}
|
||||
if (followingData === undefined) {
|
||||
if (!isLoadingFollowing && followingData === undefined) {
|
||||
setBye(true);
|
||||
}
|
||||
}, [followingData]);
|
||||
}, [followingData, isLoadingFollowing]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (data) {
|
||||
|
||||
Reference in New Issue
Block a user