diff --git a/apps/admin-x-activitypub/src/components/global/FollowButton.tsx b/apps/admin-x-activitypub/src/components/global/FollowButton.tsx index 35a81e715b51..d03cd1770e61 100644 --- a/apps/admin-x-activitypub/src/components/global/FollowButton.tsx +++ b/apps/admin-x-activitypub/src/components/global/FollowButton.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import {Button} from '@tryghost/admin-x-design-system'; import {useEffect, useState} from 'react'; -import {useFollow} from '../../hooks/useActivityPubQueries'; +import {useFollow, useUnfollow} from '../../hooks/useActivityPubQueries'; interface FollowButtonProps { className?: string; @@ -25,7 +25,7 @@ const FollowButton: React.FC = ({ const [isFollowing, setIsFollowing] = useState(following); const [isHovered, setIsHovered] = useState(false); - const unfollowMutation = useFollow('index', + const unfollowMutation = useUnfollow('index', noop, () => { setIsFollowing(false);