621 Use translation library for data export
This commit is contained in:
@@ -3,34 +3,26 @@ import React, { useState } from 'react'
|
||||
import AppLoadingView from '../../common/app-loading'
|
||||
import AppPage from '../../common/app-page'
|
||||
import AppText from '../../common/app-text'
|
||||
import Button from '../../common/button'
|
||||
import Segment from '../../common/segment'
|
||||
|
||||
import openShareDialogAndExport from './export-dialog'
|
||||
import DeleteData from './delete-data'
|
||||
|
||||
import labels from '../../../i18n/en/settings'
|
||||
import ImportData from './ImportData'
|
||||
import ExportData from './ExportData'
|
||||
|
||||
const DataManagement = () => {
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [isDeletingData, setIsDeletingData] = useState(false)
|
||||
|
||||
const startExport = () => {
|
||||
setIsDeletingData(false)
|
||||
openShareDialogAndExport()
|
||||
}
|
||||
|
||||
if (isLoading) return <AppLoadingView />
|
||||
|
||||
return (
|
||||
<AppPage>
|
||||
<Segment title={labels.export.button}>
|
||||
<AppText>{labels.export.segmentExplainer}</AppText>
|
||||
<Button isCTA onPress={startExport}>
|
||||
{labels.export.button}
|
||||
</Button>
|
||||
</Segment>
|
||||
<ExportData
|
||||
resetIsDeletingData={() => setIsDeletingData(false)}
|
||||
setIsLoading={setIsLoading}
|
||||
/>
|
||||
<ImportData
|
||||
resetIsDeletingData={() => setIsDeletingData(false)}
|
||||
setIsLoading={setIsLoading}
|
||||
|
||||
Reference in New Issue
Block a user