diff --git a/front-end/src/User.js b/front-end/src/User.js
index 16b477348cebb9d38f17b8ef1a3bbeb42a9e865d..7274a93d38aa706e3598d5f79d861a11c320807f 100644
--- a/front-end/src/User.js
+++ b/front-end/src/User.js
@@ -14,7 +14,7 @@ export default function User() {
const [isFollowing, setIsFollowing] = useState(false);
const [user, setUser] = useState();
const [allRatings, setAllRatings] = useState({ ratings: [] });
- const { userID } = useContext(AuthContext);
+ const { userID, authState } = useContext(AuthContext);
function getUser() {
const data = { userID: id };
axios
@@ -206,7 +206,7 @@ export default function User() {
followUser={followUser}
/>
<div className="followButton">
- {isFollowing ? (
+ {authState && isFollowing ? (
<button className="bubble-button" onClick={() => unfollowUser()}>
Unfollow
</button>