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

fix: add redirection logic for works page #7614

Merged
merged 1 commit into from
May 28, 2021

Conversation

return
}

const { partner } = props as any
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to get rid of this any?

Looks like you could also shorten this to if (!props.partner) ... which might avoid this as well.

Copy link
Contributor Author

@ivan-badyulya ivan-badyulya May 24, 2021

Choose a reason for hiding this comment

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

Screen Shot 2021-05-24 at 4 33 44 PM

This way wouldn't avoid the problem. The TS defines props as field from found lib and can't find the partner field in render props type, that's why we decided avoiding the issue with as any

Copy link
Member

Choose a reason for hiding this comment

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

@damassi do you know if there's a way to provide types for the render function?

@sweir27 sweir27 merged commit 6ee208b into master May 28, 2021
@sweir27 sweir27 deleted the ivan-badyulya/PX-4098-RedirectFromWorksWhenCMSoff branch May 28, 2021 16:39
@artsy-peril artsy-peril bot mentioned this pull request May 28, 2021
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.

3 participants