-
Notifications
You must be signed in to change notification settings - Fork 2
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: conditionally show/hide "Continue" button on Confirmation using isFinalCard
#4029
Changes from all commits
a5ce539
62bcbc6
6f4fcf1
9afebe9
5f44a70
ca4e714
51a7ec3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,16 +75,13 @@ interface Props { | |
} | ||
|
||
const Node: React.FC<Props> = (props) => { | ||
const [childNodesOf, isFinalCard, resetPreview, cachedBreadcrumbs] = useStore( | ||
(state) => [ | ||
state.childNodesOf, | ||
state.isFinalCard(), | ||
state.resetPreview, | ||
state.cachedBreadcrumbs, | ||
], | ||
); | ||
|
||
const handleSubmit = isFinalCard ? undefined : props.handleSubmit; | ||
const [childNodesOf, resetPreview, cachedBreadcrumbs] = useStore((state) => [ | ||
state.childNodesOf, | ||
state.resetPreview, | ||
state.cachedBreadcrumbs, | ||
]); | ||
|
||
const handleSubmit = props.handleSubmit; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, in the near future, we can/will re-introduce There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Totally agree - this is the right approach here 👍 |
||
|
||
const nodeId = props.node.id; | ||
const previouslySubmittedData = | ||
|
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 one's been a long time coming (original commit) & more promising to re-introduce now since
upcomingCardIds
has been recently refactored to only be responsible for navigation and no longer optimistic auto-answeringThere 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.
Very happy to see this commented back in 👍