diff --git a/frontend/app/components/profile/profile.tsx b/frontend/app/components/profile/profile.tsx index 8233cea4..fe8511cc 100644 --- a/frontend/app/components/profile/profile.tsx +++ b/frontend/app/components/profile/profile.tsx @@ -36,20 +36,20 @@ export function Profile() { const [isCommentsLoading, setIsCommentsLoading] = useState(false); const [error, setError] = useState(false); const [comments, setComments] = useState(null); - const [commentsCounts, setCommentsCounts] = useState(null); + const [commentsAmount, setCommentsAmount] = useState(null); const [isSigningOut, setSigningOut] = useState(false); async function fetchUserComments(userId: string) { setIsCommentsLoading(true); setError(false); setComments(null); - setCommentsCounts(null); + setCommentsAmount(null); try { const { comments, count } = await getUserComments(userId); setComments(comments); - setCommentsCounts(count); + setCommentsAmount(count); } catch (err) { setError(true); } finally { @@ -127,9 +127,9 @@ export function Profile() { )} - {commentsCounts !== 0 && ( + {!!commentsAmount && (
- {commentsCounts} + {commentsAmount}
)}