Skip to content

Commit

Permalink
chore(element): Rename continue guards
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper committed Oct 30, 2024
1 parent 0a36c31 commit 8758130
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export const SignUpContinueMachine = setup({
sendToLoading,
},
guards: {
isMissingRequirements: ({ context }) =>
isStatusMissingRequirements: ({ context }) =>
context.parent.getSnapshot().context.clerk?.client?.signUp?.status === 'missing_requirements',
requirementsMet: ({ context }) => {
hasMetPreviousMissingRequirements: ({ context }) => {
const signUp = context.parent.getSnapshot().context.clerk.client.signUp;

const fields = context.formRef.getSnapshot().context.fields;
Expand Down Expand Up @@ -97,7 +97,7 @@ export const SignUpContinueMachine = setup({
description: 'Waiting for user input',
on: {
SUBMIT: {
guard: or(['requirementsMet', not('isMissingRequirements')]),
guard: or(['hasMetPreviousMissingRequirements', not('isStatusMissingRequirements')]),
target: 'Attempting',
reenter: true,
},
Expand Down

0 comments on commit 8758130

Please sign in to comment.