From e683d9be4e7e07772877aa961016c2e6fbcbc393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Tue, 3 Sep 2024 21:17:45 +0200 Subject: [PATCH] fix: migrate pressables to touchableopacity for better ui feedback --- pages/Home.tsx | 21 ++++++--------------- pages/settings/Settings.tsx | 10 +++++----- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/pages/Home.tsx b/pages/Home.tsx index 7f258bc..30a10fc 100644 --- a/pages/Home.tsx +++ b/pages/Home.tsx @@ -1,4 +1,4 @@ -import { View, Pressable, StyleSheet } from "react-native"; +import { View, Pressable, StyleSheet, TouchableOpacity } from "react-native"; import React, { useState } from "react"; import { useBalance } from "hooks/useBalance"; import { useAppStore } from "lib/state/appStore"; @@ -74,25 +74,16 @@ export function Home() { - - + } /> - setPressed(true)} - onPressOut={() => setPressed(false)} - style={{ - ...(pressed - ? { - transform: "scale(0.98)", - } - : []), - }} + @@ -132,7 +123,7 @@ export function Home() { )} - + diff --git a/pages/settings/Settings.tsx b/pages/settings/Settings.tsx index 7c32bf8..58f51e3 100644 --- a/pages/settings/Settings.tsx +++ b/pages/settings/Settings.tsx @@ -1,5 +1,5 @@ import { Link, router } from "expo-router"; -import { Alert, Pressable, TouchableOpacity, View } from "react-native"; +import { Alert, TouchableOpacity, View } from "react-native"; import { Bitcoin, Egg, Palette, Power, Wallet2 } from "~/components/Icons"; import { DEFAULT_WALLET_NAME } from "~/lib/constants"; @@ -58,7 +58,7 @@ export function Settings() { Developer mode - { router.dismissAll(); @@ -68,8 +68,8 @@ export function Settings() { > Open Onboarding - - + { Alert.alert( @@ -96,7 +96,7 @@ export function Settings() { Reset Wallet - + )}