Commit d0705063 by Nguyễn Thị Thúy

update notify

parent f0cfb2a7
......@@ -14,11 +14,6 @@ import DeviceInfo from 'react-native-device-info';
import R from './assets/R';
import {WIDTHXD, HEIGHTXD} from './Config/Functions';
import DropdownManager from './components/DropdownAlert/DropdownManager';
import AsyncStorage from '@react-native-community/async-storage';
import KEY from './assets/AsynStorage';
import I18n, {setLocation} from './helper/i18/i18n';
import {changeLanguage} from './actions/language';
enableScreens();
......@@ -28,16 +23,11 @@ const RootView = (props) => {
dropDownAlertRef.current,
dropDownAlertLongTimeRef.current,
);
setInitLanguage()
}, []);
const dropDownAlertRef = useRef(null);
const dropDownAlertLongTimeRef = useRef(null);
const setInitLanguage = async () => {
const laguage = await AsyncStorage.getItem(KEY.LANGUAGE);
if (laguage) props.changeLanguage(laguage);
setLocation(I18n, laguage);
};
return (
<>
<View style={{flex: 1}}>
......@@ -57,10 +47,11 @@ const RootView = (props) => {
closeInterval={1000}
ref={dropDownAlertRef}
warnColor={R.colors.orange400}
updateStatusBar={false}
defaultContainer={{
borderBottomRightRadius: WIDTHXD(30),
borderBottomLeftRadius: WIDTHXD(30),
paddingTop: HEIGHTXD(30),
paddingTop: HEIGHTXD(90),
paddingVertical: HEIGHTXD(30),
paddingHorizontal: WIDTHXD(20),
}}
......@@ -76,10 +67,11 @@ const RootView = (props) => {
closeInterval={600000}
ref={dropDownAlertLongTimeRef}
warnColor={R.colors.orange400}
updateStatusBar={false}
defaultContainer={{
borderBottomRightRadius: WIDTHXD(30),
borderBottomLeftRadius: WIDTHXD(30),
paddingTop: HEIGHTXD(30),
paddingTop: HEIGHTXD(90),
paddingVertical: HEIGHTXD(30),
paddingHorizontal: WIDTHXD(20),
}}
......@@ -95,4 +87,4 @@ const mapStateToProps = (state) => {
};
};
export default connect(mapStateToProps, {changeLanguage})(RootView);
export default connect(mapStateToProps, {})(RootView);
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