Skip to content

Commit

Permalink
Changed PWA flow as per the pwa backend repo code
Browse files Browse the repository at this point in the history
  • Loading branch information
del22123 committed Oct 18, 2024
1 parent 47bdeea commit 5963e11
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const CREATE_ACCOUNT = gql`
# eslint-disable-next-line @graphql-eslint/require-id-when-available
customer {
email
is_confirmed
}
}
}
Expand Down
18 changes: 1 addition & 17 deletions packages/peregrine/lib/talons/FormError/useFormError.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,8 @@ export const useFormError = props => {
var graphqlErrorMessage;

if (firstError) {
var category = firstError.graphQLErrors?.find(
extensions => extensions
).extensions?.category;
category = category
? category
.split('-')
.map((word, index) =>
index === 0
? word
: word.charAt(0).toUpperCase() + word.slice(1)
)
.join('')
: null;
const errorId = category
? 'formError.' + category
: 'formError.responseError';
graphqlErrorMessage = formatMessage({
id: errorId,
id: 'formError.responseError',
defaultMessage: firstError.message
});
}
Expand Down
1 change: 0 additions & 1 deletion packages/venia-ui/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
"forgotPasswordPage.header": "Forgot Your Password?",
"forgotPasswordPage.title": "Forgot Your Password?",
"formError.errorMessage": "An error has occurred. Please check the input and try again.",
"formError.graphqlAuthenticationEmailNotConfirmed": "Your account is created, You must confirm your account. Please check your email for the confirmation link.",
"formSubmissionSuccessful.recoverPasswordText": "Recover Password",
"formSubmissionSuccessful.textMessage": "If there is an account associated with {email} you will receive an email with a link to change your password.",
"galleryItem.unavailableProduct": "Currently unavailable for purchase.",
Expand Down

0 comments on commit 5963e11

Please sign in to comment.