Skip to content

Commit

Permalink
if no user cant like
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Jun 13, 2024
1 parent b44913c commit 99833b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/LikeButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ const LikeButton = ({ post, user }) => {
);

const handleReaction = async reaction => {
if (!user) {

if (!user?.isLoggedIn) {
toast("Sign in to react to posts.", {
duration: 5000,
icon: "💔",
Expand Down

0 comments on commit 99833b7

Please sign in to comment.