Skip to content

Commit

Permalink
Cleared all lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Santhosh Vijay <[email protected]>
  • Loading branch information
santhoshtiptur authored and santhoshvijay11 committed Jan 27, 2025
1 parent 6ae2cfc commit 9d3fd91
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions app/components/BackupItemModal/BackupItemModal.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
import React, { useState } from 'react';
import { View, Text } from 'react-native';
import { CheckBox } from 'react-native-elements';
import { ConfirmModal, LoadingIndicatorDots, PasswordForm } from '..';

import { TouchableOpacity } from 'react-native';
import { Text } from 'react-native';
import { ConfirmModal, LoadingIndicatorDots } from '..';
import { useAsyncCallback } from 'react-async-hook';

import dynamicStyleSheet from './BackupItemModal.styles';
import { BackupItemModalProps } from './BackupItemModal.d';
import { useDynamicStyles } from '../../hooks';


export default function BackupItemModal({ onRequestClose, open, onBackup, backupItemName, backupModalText }: BackupItemModalProps): React.ReactElement {
const { styles, mixins, theme } = useDynamicStyles(dynamicStyleSheet);
const [enablePassword, setEnablePassword] = useState(false);
const [password, setPassword] = useState<string>();

const { mixins } = useDynamicStyles(dynamicStyleSheet);
const createBackup = useAsyncCallback(
() => onBackup(),
{ onSuccess: onRequestClose, onError: onRequestClose }
);

const readyToBackup = !(enablePassword && !password);

if (createBackup.loading) {
return <ConfirmModal
title={`Backing Up Your ${backupItemName}`}
Expand All @@ -46,7 +37,6 @@ export default function BackupItemModal({ onRequestClose, open, onBackup, backup
title={`Backup ${backupItemName}`}
cancelText="Cancel"
confirmText="Create Backup"
confirmButtonDisabled={!readyToBackup}
>
<Text style={mixins.modalBodyText}>
{backupModalText}
Expand Down

0 comments on commit 9d3fd91

Please sign in to comment.