diff --git a/src/components/Thumbs.jsx b/src/components/Thumbs.jsx index 52cac18a8ce4fab19a37f93e5ba2da1e71b01d23..024baaba705f2c133f80564e6e6bd4c575c01cb1 100644 --- a/src/components/Thumbs.jsx +++ b/src/components/Thumbs.jsx @@ -8,9 +8,10 @@ const Thumbs = ({ likes, dislikes, myVote, onLike, onDislike, readOnly }) => { <button className={classNames("flex items-center space-x-1", { "cursor-pointer": !readOnly, - "cursor-default": readOnly, + "cursor-not-allowed": readOnly, "text-blue-300": myVote === "like", - "text-grey-200 hover:text-blue-300": myVote !== "like", + "text-grey-200 ": myVote !== "like", + "hover:text-blue-300": myVote !== "like" && !readOnly, })} disabled={readOnly} onClick={onLike} @@ -21,9 +22,10 @@ const Thumbs = ({ likes, dislikes, myVote, onLike, onDislike, readOnly }) => { <button className={classNames("flex items-center space-x-1", { "cursor-pointer": !readOnly, - "cursor-default": readOnly, + "cursor-not-allowed": readOnly, "text-red-600": myVote === "dislike", - "text-grey-200 hover:text-red-600": myVote !== "dislike", + "text-grey-200": myVote !== "dislike", + "hover:text-red-600": myVote !== "dislike" && !readOnly, })} disabled={readOnly} onClick={onDislike} diff --git a/src/components/posts/Post.jsx b/src/components/posts/Post.jsx index 16314463205187364769561bc03518229fd16dc1..3e3a5e698fcf584d030857b3ba6986c178e382ed 100644 --- a/src/components/posts/Post.jsx +++ b/src/components/posts/Post.jsx @@ -159,6 +159,9 @@ const Post = ({ __html: content, }; + const thumbsEnabled = + canThumb && !archived && (type === "post" || state === "announced"); + return ( <div className={wrapperClassName} ref={ref}> <img @@ -196,7 +199,7 @@ const Post = ({ <Thumbs likes={ranking.likes} dislikes={ranking.dislikes} - readOnly={!canThumb} + readOnly={!thumbsEnabled} onLike={onLike} onDislike={onDislike} myVote={ranking.myVote}