wudebin 3 tháng trước cách đây
mục cha
commit
d6c801cbb2

+ 1 - 1
Strides-SPAPP/app/pages/home/Home.js

@@ -570,7 +570,7 @@ export default class HomePage extends Component {
 
   render() {
     return (
-      <View style={StyleSheet.absoluteFillObject}>
+      <View style={ui.flex1}>
         { app.isLumiWhitelabel
         ? <MapUILumi
             state={this.state}

+ 2 - 2
Strides-SPAPP/app/pages/home/MapUI.js

@@ -11,7 +11,7 @@ import Maps from './maps/Maps';
 import PinMessage from './maps/PinMessage';
 import SearchTool from './maps/SearchTool';
 
-export default MapUI = ({
+export default MapUI = React.memo(({
   state,
   navigation,
   onFilter,
@@ -85,7 +85,7 @@ export default MapUI = ({
       </View>
     </View>
   );
-}
+})
 
 const styles = StyleSheet.create({
   logoView: {

+ 16 - 20
Strides-SPAPP/app/pages/home/maps/SearchTool.js

@@ -96,26 +96,22 @@ export default class SearchTool extends Component {
               {$t('home.search')}
             </Text>
           </Pressable>
-          { this.props.mapReady &&
-            <BackButton
-              style={styles.mapIcon}
-              onPress={() => this.showFilter()}>
-              <FontAwesome
-                name='filter'
-                size={26}
-                color={colorPrimary}/>
-            </BackButton>
-          }
-          { this.props.mapReady &&
-            <BackButton
-              style={styles.mapIcon}
-              onPress={() => this.props.onLocation()}>
-              <MaterialIcons
-                name='my-location'
-                size={26}
-                color={colorPrimary}/>
-            </BackButton>
-          }
+          <BackButton
+            style={styles.mapIcon}
+            onPress={() => this.showFilter()}>
+            <FontAwesome
+              name='filter'
+              size={26}
+              color={colorPrimary}/>
+          </BackButton>
+          <BackButton
+            style={styles.mapIcon}
+            onPress={() => this.props.onLocation()}>
+            <MaterialIcons
+              name='my-location'
+              size={26}
+              color={colorPrimary}/>
+          </BackButton>
           {/* <View style={styles.mapToolView}>
             <TouchableOpacity
               style={styles.mapIcon}