Skip to content

Commit

Permalink
fix comment permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed Apr 24, 2024
1 parent c2e79d5 commit fd7dfba
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/components/form/comment-form-loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ export const CommentFormLoader = ({ post }: { post: Post }) => {
if (user.login === post.user?.login)
return <CommentUnavailable message="You can't comment on your own post" />;

if (user.login !== post.user?.login)
return <CommentUnavailable message="You can only view comments" />;

return <CommentForm post={post} />;
};

Expand Down

0 comments on commit fd7dfba

Please sign in to comment.