Procházet zdrojové kódy

Show some buttons only on Android e2e for now

Guy Carmeli před 6 roky
rodič
revize
920ac4185b
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3
    3
      playground/src/screens/WelcomeScreen.js

+ 3
- 3
playground/src/screens/WelcomeScreen.js Zobrazit soubor

@@ -1,6 +1,6 @@
1 1
 const React = require('react');
2 2
 const { Component } = require('react');
3
-const { View, Text, Button } = require('react-native');
3
+const { View, Text, Button, Platform } = require('react-native');
4 4
 
5 5
 const testIDs = require('../testIDs');
6 6
 
@@ -36,8 +36,8 @@ class WelcomeScreen extends Component {
36 36
         <Button title="Static Lifecycle Events" testID={testIDs.PUSH_STATIC_LIFECYCLE_BUTTON} onPress={this.onClickShowStaticLifecycleOverlay} />
37 37
         <Button title="Push" testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
38 38
         <Button title="Push Options Screen" testID={testIDs.PUSH_OPTIONS_BUTTON} onPress={this.onClickPushOptionsScreen} />
39
-        <Button title="Push Top Tabs screen" testID={testIDs.PUSH_TOP_TABS_BUTTON} onPress={this.onClickPushTopTabsScreen} />
40
-        <Button title="Back Handler" testID={testIDs.BACK_HANDLER_BUTTON} onPress={this.onClickBackHandler} />
39
+        {Platform.OS === 'android' && <Button title="Push Top Tabs screen" testID={testIDs.PUSH_TOP_TABS_BUTTON} onPress={this.onClickPushTopTabsScreen} />}
40
+        {Platform.OS === 'android' && <Button title="Back Handler" testID={testIDs.BACK_HANDLER_BUTTON} onPress={this.onClickBackHandler} />}
41 41
         <Button title="Show Modal" testID={testIDs.SHOW_MODAL_BUTTON} onPress={this.onClickShowModal} />
42 42
         <Button title="Show Redbox" testID={testIDs.SHOW_REDBOX_BUTTON} onPress={this.onClickShowRedbox} />
43 43
         <Button title="Orientation" testID={testIDs.ORIENTATION_BUTTON} onPress={this.onClickPushOrientationMenuScreen} />