Created
October 22, 2019 16:07
-
-
Save dennyjohnk/04f8b4392317098bb1dbb5b73bc998bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Post = props => { ---> is it possible to destructure ths to /*** const Post = props => { ****/ ? Just becoz am using props.history.push am not able to desctructure this :( | |
const post = props.post; | |
return ( | |
<div className="post-container" key={post.id}> | |
{post.companyName ? <CompanyInfo companyName={post.companyName} /> : ""} | |
<UserInfo post={post} /> | |
<div | |
className="cursor-pointer post-title" | |
onClick={() => props.history.push("/post/" + post.url)} | |
> | |
{post.title} | |
</div> | |
<div className="post-title-container "> | |
<p className=" post-description truncate-description"> | |
{post.description} | |
</p> | |
</div> | |
<ActionBar post={post} /> | |
<div className="break-line"></div> | |
<Footer post={post} /> | |
</div> | |
); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment