Skip to content

Conversation

adrw
Copy link
Collaborator

@adrw adrw commented Jul 12, 2019

No description provided.

<hr css={cssMenuDivider} />
<FlexContainer css={cssMenuLinks}>
{props.categoryLinks &&
props.categoryLinks.map((link: IDashboardTab) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can also be done with mapProps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterating over the props.categoryLinks?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the iteration, but the function mapping the IDashboardTab to a MiskLink is a Component, so you can just wrap the MiskLink in an appropriate mapProps.

<FlexContainer css={cssMenuLinks}>
{props.categoryLinks &&
props.categoryLinks.map((link: IDashboardTab) => {
<MiskLink
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There continues to be a Typescript error where MiskLink won't accept keys: children, key, onClick, to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants