Prettify rest of the components files except stats

This commit is contained in:
Sofiya Tepikin
2022-09-08 12:19:36 +02:00
parent 23549ee72d
commit 840fca5b9e
14 changed files with 208 additions and 226 deletions
@@ -27,22 +27,20 @@ export default class ConfirmWithPassword extends Component {
this.setState({ password: null })
}
onIncorrectPassword = () => {
Alert.alert(
shared.incorrectPassword,
shared.incorrectPasswordMessage,
[{
Alert.alert(shared.incorrectPassword, shared.incorrectPasswordMessage, [
{
text: shared.cancel,
onPress: this.props.onCancel
}, {
onPress: this.props.onCancel,
},
{
text: shared.tryAgain,
onPress: this.resetPasswordInput
}]
)
onPress: this.resetPasswordInput,
},
])
}
checkPassword = async hash => {
checkPassword = async (hash) => {
try {
await openDb(hash)
this.props.onSuccess()
@@ -73,9 +71,7 @@ export default class ConfirmWithPassword extends Component {
secureTextEntry={true}
/>
<View style={styles.container}>
<Button onPress={this.props.onCancel}>
{shared.cancel}
</Button>
<Button onPress={this.props.onCancel}>{shared.cancel}</Button>
<Button
disabled={!isPassword}
isCTA={isPassword}
@@ -86,17 +82,16 @@ export default class ConfirmWithPassword extends Component {
</View>
</React.Fragment>
)
}
}
ConfirmWithPassword.propTypes = {
onSuccess: PropTypes.func,
onCancel: PropTypes.func
onCancel: PropTypes.func,
}
const styles = StyleSheet.create({
container: {
...Containers.rowContainer
}
})
...Containers.rowContainer,
},
})