import { asp as g } from "@asp/asp"; import Entypo from "@expo/vector-icons/Entypo"; import { ImageBackground } from "expo-image"; import * as LocalAuthentication from "expo-local-authentication"; import { type FC, useState } from "react"; import type { ViewProps } from "react-native"; import { Text, TouchableOpacity } from "react-native"; type BalanceProps = Omit & { amount: number }; export const Balance: FC = ({ style, amount = 0, ...rest }) => { const [showBalance, setShowBalance] = useState(false); const handleLocalAuthentication = async () => { console.log("handleLocalAuthentication :: start"); if (showBalance) { return setShowBalance(false); } const result = await LocalAuthentication.authenticateAsync(); if (result.success) { setShowBalance(true); } console.log("handleLocalAuthentication :: end", result); }; return ( {showBalance ? ( setShowBalance(false)}> {amount} ) : ( )} ); };