From 0ec23219bf19b3730e28d751178f3375c7f4b67b Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 13:54:22 +0200 Subject: [PATCH] Prettify files before other changes Prettify --- components/app-wrapper.js | 10 ++++----- components/app.js | 24 +++++++++------------ components/settings/password/create.js | 5 ++--- components/settings/password/index.js | 30 ++++++++++---------------- components/settings/password/update.js | 17 ++++++--------- 5 files changed, 35 insertions(+), 51 deletions(-) diff --git a/components/app-wrapper.js b/components/app-wrapper.js index 6810d24..2769da4 100644 --- a/components/app-wrapper.js +++ b/components/app-wrapper.js @@ -12,7 +12,7 @@ import AppStatusBar from './common/app-status-bar' import License from './License' import PasswordPrompt from './password-prompt' -import store from "../store" +import store from '../store' export default class AppWrapper extends Component { constructor() { @@ -51,7 +51,7 @@ export default class AppWrapper extends Component { enableShowLicenseAgreement = () => { this.setState({ shouldShowLicenseAgreement: true, - isCheckingLicenseAgreement: false + isCheckingLicenseAgreement: false, }) } @@ -62,7 +62,7 @@ export default class AppWrapper extends Component { enableShowApp = () => { this.setState({ shouldShowApp: true, - shouldShowPasswordPrompt: false + shouldShowPasswordPrompt: false, }) } @@ -79,7 +79,7 @@ export default class AppWrapper extends Component { if (isCheckingLicenseAgreement) { initialView = } else if (shouldShowLicenseAgreement) { - initialView = + initialView = } else if (shouldShowPasswordPrompt) { initialView = } else if (shouldShowApp) { @@ -100,5 +100,5 @@ export default class AppWrapper extends Component { const styles = StyleSheet.create({ container: { flex: 1, - } + }, }) diff --git a/components/app.js b/components/app.js index f8a0350..885c282 100644 --- a/components/app.js +++ b/components/app.js @@ -17,7 +17,6 @@ import setupNotifications from '../lib/notifications' import { getCycleDay, closeDb } from '../db' class App extends Component { - static propTypes = { date: PropTypes.string, navigation: PropTypes.object.isRequired, @@ -80,8 +79,8 @@ class App extends Component { return ( -
- +
+ ) @@ -90,25 +89,22 @@ class App extends Component { const styles = StyleSheet.create({ container: { - flex: 1 - } + flex: 1, + }, }) const mapStateToProps = (state) => { - return({ + return { date: getDate(state), - navigation: getNavigation(state) - }) + navigation: getNavigation(state), + } } const mapDispatchToProps = (dispatch) => { - return({ + return { navigate: (page) => dispatch(navigate(page)), goBack: () => dispatch(goBack()), - }) + } } -export default connect( - mapStateToProps, - mapDispatchToProps -)(App) +export default connect(mapStateToProps, mapDispatchToProps)(App) diff --git a/components/settings/password/create.js b/components/settings/password/create.js index 8838b30..b081afc 100644 --- a/components/settings/password/create.js +++ b/components/settings/password/create.js @@ -23,7 +23,7 @@ export default class CreatePassword extends Component { showBackUpReminder(this.toggleSettingPassword, () => {}) } - render () { + render() { const { isSettingPassword } = this.state const labels = settings.passwordSettings @@ -36,6 +36,5 @@ export default class CreatePassword extends Component { } else { return } - } -} \ No newline at end of file +} diff --git a/components/settings/password/index.js b/components/settings/password/index.js index 5e67e5d..dd480c3 100644 --- a/components/settings/password/index.js +++ b/components/settings/password/index.js @@ -18,7 +18,7 @@ export default class PasswordSetting extends Component { this.state = { isPasswordSet: hasEncryptionObservable.value, isChangingPassword: false, - isDeletingPassword: false + isDeletingPassword: false, } } @@ -39,18 +39,10 @@ export default class PasswordSetting extends Component { } render() { + const { isPasswordSet, isChangingPassword, isDeletingPassword } = this.state - const { - isPasswordSet, - isChangingPassword, - isDeletingPassword, - } = this.state - - const { - title, - explainerEnabled, - explainerDisabled - } = labels.passwordSettings + const { title, explainerEnabled, explainerDisabled } = + labels.passwordSettings return ( @@ -59,19 +51,19 @@ export default class PasswordSetting extends Component { {isPasswordSet ? explainerEnabled : explainerDisabled} - {!isPasswordSet && } + {!isPasswordSet && } - {(isPasswordSet && !isDeletingPassword) && ( + {isPasswordSet && !isDeletingPassword && ( )} - {(isPasswordSet && !isChangingPassword) && ( + {isPasswordSet && !isChangingPassword && ( )} diff --git a/components/settings/password/update.js b/components/settings/password/update.js index a711262..270defd 100644 --- a/components/settings/password/update.js +++ b/components/settings/password/update.js @@ -12,7 +12,7 @@ import settings from '../../../i18n/en/settings' export default class ChangePassword extends Component { static propTypes = { onStartChange: PropTypes.func, - onCancelChange: PropTypes.func + onCancelChange: PropTypes.func, } constructor() { @@ -21,7 +21,7 @@ export default class ChangePassword extends Component { this.state = { currentPassword: null, enteringCurrentPassword: false, - enteringNewPassword: false + enteringNewPassword: false, } } @@ -41,7 +41,7 @@ export default class ChangePassword extends Component { this.setState({ currentPassword: null, enteringNewPassword: true, - enteringCurrentPassword: false + enteringCurrentPassword: false, }) } @@ -49,17 +49,14 @@ export default class ChangePassword extends Component { this.setState({ currentPassword: null, enteringNewPassword: false, - enteringCurrentPassword: false + enteringCurrentPassword: false, }) this.props.onCancelChange() } render() { - const { - enteringCurrentPassword, - enteringNewPassword, - currentPassword - } = this.state + const { enteringCurrentPassword, enteringNewPassword, currentPassword } = + this.state const labels = settings.passwordSettings const isPasswordSet = currentPassword !== null @@ -86,4 +83,4 @@ export default class ChangePassword extends Component { ) } -} \ No newline at end of file +}