From a7bdd4b6a6fd48a852a3313da5f4838ba4077ebb Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Mon, 8 Aug 2022 12:37:20 +0200 Subject: [PATCH] Prettify enter-new-password --- .../settings/password/enter-new-password.js | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/components/settings/password/enter-new-password.js b/components/settings/password/enter-new-password.js index 15f5d08..7ce4733 100644 --- a/components/settings/password/enter-new-password.js +++ b/components/settings/password/enter-new-password.js @@ -13,7 +13,6 @@ import settings from '../../../i18n/en/settings' const LISTENER_TYPE = 'create-or-change-pw' export default class EnterNewPassword extends Component { - constructor() { super() this.state = { @@ -52,15 +51,12 @@ export default class EnterNewPassword extends Component { this.setState({ passwordConfirmation }) } - render () { - const { - password, - passwordConfirmation, - shouldShowErrorMessage - } = this.state + render() { + const { password, passwordConfirmation, shouldShowErrorMessage } = + this.state const labels = settings.passwordSettings const isButtonActive = - (password.length > 0) && (passwordConfirmation.length > 0) + password.length > 0 && passwordConfirmation.length > 0 return ( @@ -80,9 +76,9 @@ export default class EnterNewPassword extends Component { value={passwordConfirmation} secureTextEntry={true} /> - {shouldShowErrorMessage && + {shouldShowErrorMessage && ( {labels.passwordsDontMatch} - } + )} @@ -94,6 +90,6 @@ export default class EnterNewPassword extends Component { const styles = StyleSheet.create({ error: { color: Colors.orange, - marginTop: Spacing.base - } -}) \ No newline at end of file + marginTop: Spacing.base, + }, +})