テキスト表示を特定タイミングに修正

This commit is contained in:
harukin-OneMix4 2023-12-13 04:55:32 +09:00
parent 2199e9cc57
commit a6a2a6dfbb

3
App.js
View File

@ -103,7 +103,7 @@ export default function App() {
return ( return (
<NavigationContainer name="Root" style={{ flex: 1 }}> <NavigationContainer name="Root" style={{ flex: 1 }}>
<Text onPress={() => alert(areaInfo)}>{areaInfo}</Text> {areaInfo != "" && <Text onPress={() => alert(areaInfo)}>{areaInfo}</Text>}
<Tab.Navigator detachInactiveScreens={false}> <Tab.Navigator detachInactiveScreens={false}>
<Tab.Screen <Tab.Screen
name="login" name="login"
@ -160,6 +160,7 @@ export default function App() {
headerTransparent: true, headerTransparent: true,
gestureEnabled: true, gestureEnabled: true,
tabBarIcon: initIcon("md-train", "Ionicons"), tabBarIcon: initIcon("md-train", "Ionicons"),
tabBarBadge: areaInfo ? "!" : undefined,
}} }}
> >
{(props) => <TNDView {...props} />} {(props) => <TNDView {...props} />}