diff --git a/native/profile/backup-menu.react.js b/native/profile/backup-menu.react.js --- a/native/profile/backup-menu.react.js +++ b/native/profile/backup-menu.react.js @@ -2,11 +2,10 @@ import invariant from 'invariant'; import * as React from 'react'; -import { Switch, Text, View } from 'react-native'; +import { Text, View } from 'react-native'; import { ScrollView } from 'react-native-gesture-handler'; import { getMessageForException } from 'lib/utils/errors.js'; -import { useDispatch } from 'lib/utils/redux-utils.js'; import type { ProfileNavigationProp } from './profile.react.js'; import { useClientBackup } from '../backup/use-client-backup.js'; @@ -14,7 +13,6 @@ import Button from '../components/button.react.js'; import { commCoreModule } from '../native-modules.js'; import type { NavigationRoute } from '../navigation/route-names.js'; -import { setLocalSettingsActionType } from '../redux/action-types.js'; import { useSelector } from '../redux/redux-utils.js'; import { useColors, useStyles } from '../themes/colors.js'; import Alert from '../utils/alert.js'; @@ -26,14 +24,9 @@ // eslint-disable-next-line no-unused-vars function BackupMenu(props: Props): React.Node { const styles = useStyles(unboundStyles); - const dispatch = useDispatch(); const colors = useColors(); const currentUserInfo = useSelector(state => state.currentUserInfo); const getBackupSecret = useGetBackupSecretForLoggedInUser(); - - const isBackupEnabled = useSelector( - state => state.localSettings.isBackupEnabled, - ); const latestBackupInfo = useSelector( state => state.backupStore.latestBackupInfo, ); @@ -156,29 +149,11 @@ userIdentifier, ]); - const onBackupToggled = React.useCallback( - (value: boolean) => { - dispatch({ - type: setLocalSettingsActionType, - payload: { isBackupEnabled: value }, - }); - }, - [dispatch], - ); - return ( - SETTINGS - - - Toggle automatic backup - - - - ACTIONS