Skip to content

Commit

Permalink
Update src/components/PostsList.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Volodymyr Soltys <64750958+volodymyr-soltys97@users.noreply.github.com>
  • Loading branch information
mykyta01 and volodymyr-soltys97 authored Aug 25, 2024
1 parent 28da1a0 commit f013c28
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/PostsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export const PostsList: React.FC<Props> = ({ posts }) => {
className={classNames('button is-link', {
'is-light': selectedPost?.id !== post.id,
})}
onClick={() => {
setSelectedPost(selectedPost?.id === post.id ? null : post);
}}
onClick={() => setSelectedPost(selectedPost?.id === post.id ? null : post)}
>
{selectedPost?.id === post.id ? 'Close' : 'Open'}
</button>
Expand Down

0 comments on commit f013c28

Please sign in to comment.