Hashnode / starter-kit

A blog starter kit to use Hashnode as a Headless CMS using GraphQL APIs.

Home Page:https://hashnode.com/headless

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong way of rendering React Components

iamandrewluca opened this issue · comments

It seems this line renders React Components in the wrong way.
Is this intended or did I miss some context?! 🤔

{post ? Post(publication, post) : Page(page)}

Should be something like this

{post ? <Post publication={publication} post={post /> : <Page page={page} />}

The problem is explained in this video: https://youtu.be/QuLfCUh-iwI?t=25

@iamandrewluca Nice catch! Do you mind raising a PR? I think we have the same problem in all 3 themes - enterprise, personal and hashnode.

Will see if I can find some time in the upcoming week, will raise a PR.

@panda-sandeep please see #64

PS: I suggest to run a prettier format on the entire project. Should reduce the diffs in the PRs and commits.