Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Added missing product attributes #536

Merged
merged 7 commits into from
Dec 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update register and reset password forms
orzechdev committed Dec 19, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit e264b5f960791b9bb256ef1c75f7665fe459deaf
6 changes: 3 additions & 3 deletions src/components/OverlayManager/Login/RegisterForm.tsx
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ const showSuccessNotification = (
hide: () => void,
alert: AlertManager
) => {
const successful = maybe(() => !data.customerRegister.errors.length);
const successful = maybe(() => !data.accountRegister.errors.length);

if (successful) {
hide();
@@ -36,7 +36,7 @@ const RegisterForm: React.FC<{ hide: () => void }> = ({ hide }) => {
{(registerCustomer, { loading, data }) => {
return (
<Form
errors={maybe(() => data.customerRegister.errors, [])}
errors={maybe(() => data.accountRegister.errors, [])}
onSubmit={(event, { email, password }) => {
event.preventDefault();
registerCustomer({ variables: { email, password } });
@@ -57,7 +57,7 @@ const RegisterForm: React.FC<{ hide: () => void }> = ({ hide }) => {
required
/>
<div className="login__content__button">
<Button type="submit" {...loading && { disabled: true }}>
<Button type="submit" {...(loading && { disabled: true })}>
{loading ? "Loading" : "Register"}
</Button>
</div>
4 changes: 2 additions & 2 deletions src/components/PasswordResetForm/index.tsx
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ const PasswordResetForm: React.FC = () => (
{(passwordReset, { loading, data }) => {
return (
<Form
errors={maybe(() => data.customerPasswordReset.errors, [])}
errors={maybe(() => data.requestPasswordReset.errors, [])}
onSubmit={(event, { email }) => {
event.preventDefault();
passwordReset({ variables: { email } });
@@ -30,7 +30,7 @@ const PasswordResetForm: React.FC = () => (
required
/>
<div className="password-reset-form__button">
<Button type="submit" {...loading && { disabled: true }}>
<Button type="submit" {...(loading && { disabled: true })}>
{loading ? "Loading" : "Reset password"}
</Button>
</div>