From 1eb20a9343a5344b7dd41d5bebb39ef10a6c48a6 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Thu, 30 Apr 2026 09:28:58 +0200 Subject: [PATCH 1/2] Use `Touchable` instead of `RectButton` --- apps/common-app/App.tsx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/apps/common-app/App.tsx b/apps/common-app/App.tsx index d175843eae..33dbf56957 100644 --- a/apps/common-app/App.tsx +++ b/apps/common-app/App.tsx @@ -1,3 +1,5 @@ +/* eslint-disable @eslint-react/no-nested-component-definitions */ +/* eslint-disable @eslint-react/no-nested-components */ import AsyncStorage from '@react-native-async-storage/async-storage'; import type { ParamListBase } from '@react-navigation/native'; import { NavigationContainer } from '@react-navigation/native'; @@ -13,6 +15,7 @@ import { GestureHandlerRootView, RectButton, Switch, + Touchable, } from 'react-native-gesture-handler'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; @@ -123,7 +126,7 @@ export default function App() { navigate(navigation, name)} - enabled={!item.unsupportedPlatforms?.has(Platform.OS)} + disabled={!!item.unsupportedPlatforms?.has(Platform.OS)} /> )} renderSectionHeader={({ section: { sectionTitle } }) => ( @@ -203,20 +206,26 @@ export default function App() { interface MainScreenItemProps { name: string; onPressItem: (name: string) => void; - enabled: boolean; + disabled: boolean; } - function MainScreenItem({ name, onPressItem, enabled }: MainScreenItemProps) { + function MainScreenItem({ + name, + onPressItem, + disabled, + }: MainScreenItemProps) { return ( - onPressItem(name)}> {name} - {Platform.OS !== 'macos' && enabled && ( + {Platform.OS !== 'macos' && !disabled && ( )} - + ); } } From d8337f9e400a818c6f7d238f3e0f34c263c1e717 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Thu, 30 Apr 2026 09:31:51 +0200 Subject: [PATCH 2/2] Remove RectButton Co-authored-by: Copilot --- apps/common-app/App.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/common-app/App.tsx b/apps/common-app/App.tsx index 33dbf56957..e889a25574 100644 --- a/apps/common-app/App.tsx +++ b/apps/common-app/App.tsx @@ -13,7 +13,6 @@ import { useEffect, useState } from 'react'; import { Dimensions, Platform, StyleSheet, Text, View } from 'react-native'; import { GestureHandlerRootView, - RectButton, Switch, Touchable, } from 'react-native-gesture-handler'; @@ -159,7 +158,9 @@ export default function App() { } return ( - { updateKeepSetting(!openLastExample); @@ -178,8 +179,10 @@ export default function App() { }} /> - - + { updateVersionSetting(!showLegacyVersion); @@ -198,7 +201,7 @@ export default function App() { }} /> - + ); }