diff --git a/app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx b/app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx index 1ac86266606..d958974014b 100644 --- a/app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx +++ b/app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx @@ -19,6 +19,10 @@ import ScrollableTabView, { import Icon from 'react-native-vector-icons/FontAwesome5'; import ActionView from '../../UI/ActionView'; import ButtonReveal from '../../UI/ButtonReveal'; +import Button, { + ButtonVariants, + ButtonSize, +} from '../../../component-library/components/Buttons/Button'; import { getNavigationOptionsTitle } from '../../UI/Navbar'; import InfoModal from '../../UI/Swaps/components/InfoModal'; import { ScreenshotDeterrent } from '../../UI/ScreenshotDeterrent'; @@ -68,8 +72,7 @@ const RevealPrivateCredential = ({ const [password, setPassword] = useState(''); const [warningIncorrectPassword, setWarningIncorrectPassword] = useState(''); - const [isAndroidSupportedVersion, setIsAndroidSupportedVersion] = - useState(false); + const [clipboardEnabled, setClipboardEnabled] = useState(false); const [isModalVisible, setIsModalVisible] = useState(false); const selectedAddress = useSelector( @@ -297,67 +300,69 @@ const RevealPrivateCredential = ({ } }; - const renderTabView = (privCredentialName: string) => { + useEffect(() => { Device.isAndroid() && Device.getDeviceAPILevel().then((apiLevel) => { if (apiLevel < AppConstants.LEAST_SUPPORTED_ANDROID_API_LEVEL) { - setIsAndroidSupportedVersion(false); + setClipboardEnabled(false); + return; } }); - return ( - renderTabBar()} - onChangeTab={(event: any) => onTabBarChange(event)} + setClipboardEnabled(true); + }, []); + + const renderTabView = (privCredentialName: string) => ( + renderTabBar()} + onChangeTab={(event: any) => onTabBarChange(event)} + > + - - - {strings(`reveal_credential.${privCredentialName}`)} - - - + {strings(`reveal_credential.${privCredentialName}`)} + + + + {clipboardEnabled ? ( +