Commit 9fe8ccd6 by tungnq

Merge

parent 7964f8ab
...@@ -39,7 +39,7 @@ const customHeader = (props) => { ...@@ -39,7 +39,7 @@ const customHeader = (props) => {
style={styles.input} style={styles.input}
/> />
</View> </View>
</SafeAreaView> </View>
); );
}; };
......
...@@ -9,18 +9,9 @@ import { ...@@ -9,18 +9,9 @@ import {
TouchableWithoutFeedback, TouchableWithoutFeedback,
Keyboard, Keyboard,
Image, Image,
StatusBar, // FEATURE: Import StatusBar để control status bar StatusBar,
Platform, Platform,
SafeAreaView, // FEATURE: Check platform iOS/Android SafeAreaView,
} from "react-native";
import HeaderCus from "../home/header";
import R from "../../assets/R";
import I18n from "../../helper/i18/i18n";
import ItemGrid from "./item";
import styles from "./style";
import { useNavigation } from "@react-navigation/native";
import * as SCREENNAME from "../../routers/ScreenNames";
Platform, // FEATURE: Check platform iOS/Android
} from 'react-native'; } from 'react-native';
import HeaderCus from '../home/header'; import HeaderCus from '../home/header';
import R from '../../assets/R'; import R from '../../assets/R';
...@@ -120,81 +111,41 @@ const HomeView = props => { ...@@ -120,81 +111,41 @@ const HomeView = props => {
); );
return ( return (
<SafeAreaView style={styles.container_body}>
<StatusBar barStyle="light-content" translucent={false} />
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}> <TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<View style={[{flex: 1}]}>
<View style={styles.container_body}> <View style={styles.container_body}>
<ImageBackground <ImageBackground
source={R.images.igBackgroundSlider} source={R.images.igBackgroundSlider}
style={[styles.background_header, { style={[styles.background_header]}>
}]}
>
<HeaderCus <HeaderCus
pathLogo={R.images.igLogo} pathLogo={R.images.igLogo}
width={75} width={75}
height={36} height={36}
textInput={R.colors.white} textInput={R.colors.white}
backgroundInput={R.colors.backgroundInputSearch} backgroundInput={R.colors.backgroundInputSearch}
textLabel={I18n.t("Search")} textLabel={I18n.t('Search')}
textColorLabel={R.colors.white} textColorLabel={R.colors.white}
/> />
const renderBody = () => {
return (
<View style={[{flex: 1}]}>
<View style={styles.container_body}>
<ImageBackground
source={R.images.igBackgroundSlider}
style={[styles.background_header]}>
<HeaderCus
pathLogo={R.images.igLogo}
width={75}
height={36}
textInput={R.colors.white}
backgroundInput={R.colors.backgroundInputSearch}
textLabel={I18n.t('Search')}
textColorLabel={R.colors.white}
/>
{renderProfileCard()} {renderProfileCard()}
</ImageBackground> </ImageBackground>
<ScrollView <ScrollView
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
style={styles.scroll} style={styles.scroll}
bounces={false} bounces={false}
overScrollMode="never" overScrollMode="never">
> {renderMenuSection('Học tập', menuDataStudy)}
{renderMenuSection("Học tập", menuDataStudy)} {renderMenuSection('Cá nhân', menuDataIndividual)}
{renderMenuSection("Cá nhân", menuDataIndividual)} {renderMenuSection('Dịch vụ trực tuyến', menuDataOnlineSer)}
{renderMenuSection("Dịch vụ trực tuyến", menuDataOnlineSer)}
</ScrollView> </ScrollView>
</View> </View>
{renderProfileCard()}
</ImageBackground>
<ScrollView
showsVerticalScrollIndicator={false}
style={styles.scroll}
bounces={false}
overScrollMode="never">
{renderMenuSection('Học tập', menuDataStudy)}
{renderMenuSection('Cá nhân', menuDataIndividual)}
{renderMenuSection('Dịch vụ trực tuyến', menuDataOnlineSer)}
</ScrollView>
</View> </View>
</View>
);
};
return (
<SafeAreaView style={styles.container_body}>
<StatusBar barStyle="light-content" translucent={false} />
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
{renderBody()}
</TouchableWithoutFeedback> </TouchableWithoutFeedback>
</SafeAreaView>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment