diff --git a/src/App.js b/src/App.js index 5658916..851fbb4 100644 --- a/src/App.js +++ b/src/App.js @@ -64,12 +64,11 @@ const App = () => {

SWA - Jodel

- {!selectedPost && ( -
+ +
{posts.map(post => )}
- )} {selectedPost && (
@@ -94,7 +93,7 @@ const App = () => {
- {selectedPost.comments.map(post => )} + {selectedPost.comments.map(post => )}
)} diff --git a/src/components/Post.js b/src/components/Post.js index 94ed370..ab2e1d6 100644 --- a/src/components/Post.js +++ b/src/components/Post.js @@ -42,7 +42,7 @@ const Post = ({ post, recursionDepth, selectPost, reload }) => { return (
-
setShowComments(!showComments)}> +
{if (!(click.target instanceof HTMLButtonElement)) setShowComments(!showComments)}}>
{post.id === post.parent &&

{post.title}