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
@@ -23,7 +23,7 @@ export default class DeleteData extends Component {
this.state = {
isPasswordSet: hasEncryptionObservable.value,
isConfirmingWithPassword: false
isConfirmingWithPassword: false,
}
}
@@ -38,21 +38,20 @@ export default class DeleteData extends Component {
alertBeforeDeletion = async () => {
const { question, message, confirmation, errors } = settings.deleteSegment
if (isDbEmpty() && !await RNFS.exists(exportedFilePath)) {
if (isDbEmpty() && !(await RNFS.exists(exportedFilePath))) {
alertError(errors.noData)
} else {
Alert.alert(
question,
message,
[{
Alert.alert(question, message, [
{
text: confirmation,
onPress: this.onAlertConfirmation
}, {
onPress: this.onAlertConfirmation,
},
{
text: sharedLabels.cancel,
style: 'cancel',
onPress: this.cancelConfirmationWithPassword
}]
)
onPress: this.cancelConfirmationWithPassword,
},
])
}
}
@@ -104,5 +103,5 @@ export default class DeleteData extends Component {
DeleteData.propTypes = {
isDeletingData: PropTypes.bool,
onStartDeletion: PropTypes.func.isRequired
onStartDeletion: PropTypes.func.isRequired,
}
+6 -7
View File
@@ -14,13 +14,12 @@ import labels from '../../../i18n/en/settings'
import { ACTION_DELETE, ACTION_EXPORT, ACTION_IMPORT } from '../../../config'
export default class DataManagement extends Component {
constructor(props) {
super(props)
this.state = {
isLoading: false,
currentAction: null
currentAction: null,
}
}
@@ -62,7 +61,7 @@ export default class DataManagement extends Component {
return (
<React.Fragment>
{isLoading && <AppLoadingView />}
{!isLoading &&
{!isLoading && (
<AppPage>
<Segment title={labels.export.button}>
<AppText>{labels.export.segmentExplainer}</AppText>
@@ -79,13 +78,13 @@ export default class DataManagement extends Component {
<Segment title={labels.deleteSegment.title} last>
<AppText>{labels.deleteSegment.explainer}</AppText>
<DeleteData
isDeletingData = {isDeletingData}
onStartDeletion = {() => this.setCurrentAction(ACTION_DELETE)}
isDeletingData={isDeletingData}
onStartDeletion={() => this.setCurrentAction(ACTION_DELETE)}
/>
</Segment>
</AppPage>
}
)}
</React.Fragment>
)
}
}
}