-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create categoryTile/categoryList talon #1755
Conversation
779eb56
to
d7e4f8d
Compare
If your PR is missing information, check against the original template here. At a minimum you must have the section headers from the template and provide some information in each section. |
</div> | ||
) : null; | ||
} | ||
const { data, error, loading } = mixinProps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could probably make this simpler by just returning the error and the normalized data, categoryChildren
.
* @param {object} props | ||
* @param {object} props.query - category data | ||
* @param {string} props.id - category id | ||
* @return {{ data: object, error: boolean, loading: boolean }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is error
a boolean or an Error
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look and see how we're using it in categoryList
and update the output accordingly.
Co-Authored-By: Jimmy Sanford <[email protected]>
error, | ||
loading | ||
childCategories: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good change, in line with your other comment. Stylistically, I do think you should do calculations outside of the return block, but it's not a big deal.
Also I think we should still return loading
, since a well-designed component would use it.
Refactor of
categoryList
andcategoryTile
to function component along with their...talons.Requires a full review plz.