Skip to content

Commit

Permalink
fix(user): remove delete account button
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 5, 2021
1 parent b31a82a commit feb2023
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/components/Account/Account.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('<Account>', () => {
onUpdateEmailSubmit={() => null}
onUpdateInfoSubmit={() => null}
onUpdateConsentsSubmit={() => null}
onDeleteAccountClick={() => null}
/>,
);

Expand Down
5 changes: 2 additions & 3 deletions src/components/Account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type Props = {
customerConsents?: CustomerConsent[];
onUpdateEmailSubmit: (data: CustomerFormValues) => void;
onUpdateInfoSubmit: (data: CustomerFormValues) => void;
onDeleteAccountClick: () => void;
onUpdateConsentsSubmit: (consents: CustomerConsent[]) => void;
onReset?: () => void;
panelClassName?: string;
Expand All @@ -48,7 +47,6 @@ const Account = ({
panelHeaderClassName,
onUpdateEmailSubmit,
onUpdateInfoSubmit,
onDeleteAccountClick,
onUpdateConsentsSubmit,
onReset,
}: Props): JSX.Element => {
Expand Down Expand Up @@ -116,6 +114,7 @@ const Account = ({
helperText={errors?.email}
disabled={isLoading}
editing={editing === 'account'}
required
/>
{editing === 'account' && (
<TextField
Expand All @@ -135,6 +134,7 @@ const Account = ({
{viewPassword ? <Visibility /> : <VisibilityOff />}
</IconButton>
}
required
/>
)}
<div className={styles.controls}>
Expand All @@ -147,7 +147,6 @@ const Account = ({
disabled={isLoading || !values.email || !values.confirmationPassword}
/>
<Button label={t('account.cancel')} type="reset" variant="text" onClick={() => onCancelClick(handleReset)} />
<Button label={t('account.delete_account')} type="button" onClick={onDeleteAccountClick} />
</>
) : (
<Button label={t('account.edit_account')} type="button" onClick={() => setEditing('account')} />
Expand Down
1 change: 0 additions & 1 deletion src/screens/User/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const User = (): JSX.Element => {
onReset={onReset}
panelClassName={styles.panel}
panelHeaderClassName={styles.panelHeader}
onDeleteAccountClick={() => console.error('Sure?')}
/>
)}
</AccountContainer>
Expand Down

0 comments on commit feb2023

Please sign in to comment.