Add export/import database buttons to search

This commit is contained in:
Brandon Presley 2022-12-08 13:22:02 +13:00
parent 0b6471a766
commit 0b2d4d52e1
1 changed files with 12 additions and 8 deletions

View File

@ -283,14 +283,18 @@ export default function SettingsPage() {
<Button onPress={changeSound}>{soundString || 'Default'}</Button>
</View>
)}
<Button style={{alignSelf: 'flex-start'}} onPress={exportDatabase}>
Export database
</Button>
<Button
style={{alignSelf: 'flex-start'}}
onPress={() => setImporting(true)}>
Import database
</Button>
{'export database'.includes(term.toLowerCase()) && (
<Button style={{alignSelf: 'flex-start'}} onPress={exportDatabase}>
Export database
</Button>
)}
{'import database'.includes(term.toLowerCase()) && (
<Button
style={{alignSelf: 'flex-start'}}
onPress={() => setImporting(true)}>
Import database
</Button>
)}
</Page>
<ConfirmDialog