-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat: artwork page - link to user idv flow if applicable #6366
Conversation
@@ -18,7 +18,6 @@ import { ArtworkSidebarBidAction_me } from "v2/__generated__/ArtworkSidebarBidAc | |||
import * as Schema from "v2/Artsy/Analytics/Schema" | |||
import track from "react-tracking" | |||
import { getENV } from "v2/Utils/getENV" | |||
import { bidderNeedsIdentityVerification } from "v2/Utils/identityVerificationRequirements" |
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 have now factored this out of two files (the other being Registration.tsx) because we wanted more granular definitions of what to show a user something to consider.
const userLacksIdentityVerification = | ||
sale.requireIdentityVerification && !me?.identityVerified | ||
const pendingIdentityVerification = me?.pendingIdentityVerification | ||
|
||
const shouldPromptIdVerification = | ||
!qualifiedForBidding && | ||
userLacksIdentityVerification && | ||
Boolean(pendingIdentityVerification) |
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.
Maybe the function i have been removing should actually be updated to return an interface full of idv-related properties like this instead.
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 think this is fine, as long as the login remains confined to this component.
Thanks for using semantic style of the PR title! 🙌 Strictly speaking, there isn't an |
1923e84
to
7b74da8
Compare
@bhoggard, this is now complete and ready for squash/merge. |
#squashongreen |
7b74da8
to
d39d6a9
Compare
This PR adds the link-to-identity-verification functionality similar to #6342 to our artwork pages, prompting a user with a pending identity verification to complete it. The affected component contains logic for several different sale types but i have only added a test for one of them - something probably worth addressing. There is also some basically duplicated logic between this and Registration.tsx, which is for the sale page and does not use relay.