From 76aec5f6a70a052435d437939e741ffa2faddcf8 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 9 Jan 2025 22:25:14 +0100 Subject: [PATCH] Add reproduction --- apps/src/tests/Test2586.tsx | 119 ++++++++++++++++++++++++++++++++++++ apps/src/tests/index.ts | 1 + 2 files changed, 120 insertions(+) create mode 100644 apps/src/tests/Test2586.tsx diff --git a/apps/src/tests/Test2586.tsx b/apps/src/tests/Test2586.tsx new file mode 100644 index 000000000..27f803ba0 --- /dev/null +++ b/apps/src/tests/Test2586.tsx @@ -0,0 +1,119 @@ +import React from 'react'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; +import { Text } from '@react-navigation/elements'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; +import { Button } from '@react-navigation/elements'; +import { StyleSheet, View, ScrollView, RefreshControl, Button as RNButton, Modal } from 'react-native'; +import { NavigationContainer } from '@react-navigation/native'; + +export function Home() { + const [modalVisible, setModalVisible] = React.useState(false); + + return ( + + Home Screen + Open up 'src/App.tsx' to start working on your app! + + setModalVisible(true)} /> + + setModalVisible(false)}/> + + + ); +} + +export function Settings({ closeModal }: { closeModal?: () => void }) { + return ( + + {}} /> + } + > + Empty List + console.log('Pressed!')} /> + {closeModal && ( + + )} + + + ); +} + + +const HomeTabs = createBottomTabNavigator({ + screens: { + Home: { + screen: Home, + options: { + title: 'Feed', + }, + }, + }, +}); + +const RootStack = createNativeStackNavigator({ + screens: { + HomeTabs: { + screen: HomeTabs, + options: { + title: 'Home', + headerShown: false, + }, + }, + Settings: { + screen: Settings, + options: { + presentation: 'modal', + headerShown: false, + }, + }, + }, +}); + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + gap: 10, + }, + row: { + flexDirection: 'row', + gap: 10, + }, + text: { + width: '100%', + padding: 10, + }, +}); + +//export const Navigation = createStaticNavigation(RootStack); +// + +function HomeTabsComponent() { + return ( + + + + ); +} + +export default function App() { + return ( + + + + + + + + ); +} diff --git a/apps/src/tests/index.ts b/apps/src/tests/index.ts index 896e932eb..ab50066f5 100644 --- a/apps/src/tests/index.ts +++ b/apps/src/tests/index.ts @@ -117,6 +117,7 @@ export { default as Test2332 } from './Test2332'; export { default as Test2379 } from './Test2379'; export { default as Test2395 } from './Test2395'; export { default as Test2552 } from './Test2552'; +export { default as Test2586 } from './Test2586'; export { default as TestScreenAnimation } from './TestScreenAnimation'; export { default as TestScreenAnimationV5 } from './TestScreenAnimationV5'; export { default as TestHeader } from './TestHeader';