Skip to content
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

WIP on MiskLink using Recompose #407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

WIP on MiskLink using Recompose #407

wants to merge 1 commit into from

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) => {
Copy link
Collaborator

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?

Copy link
Collaborator

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