Commit 38e610cd by Giang Tran

update code

parent 94aecd32
...@@ -21,8 +21,7 @@ const Media = (props) => { ...@@ -21,8 +21,7 @@ const Media = (props) => {
platform: Platform.OS, platform: Platform.OS,
}); });
if (res.data.code == 200 && res.data.data) { if (res.data.code == 200 && res.data.data) {
if (res.data.data[0] && res.data.data[0].data[0]) if (res.data.data[0] && res.data.data[0].data[0]) setMediaHot([]);
setMediaHot(res.data.data[0].data[0]);
setData(res.data.data); setData(res.data.data);
} else { } else {
showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data')); showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data'));
......
...@@ -13,6 +13,7 @@ import Block from '../../../components/Block'; ...@@ -13,6 +13,7 @@ import Block from '../../../components/Block';
import Icon from 'react-native-vector-icons/AntDesign'; import Icon from 'react-native-vector-icons/AntDesign';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import {MEDIADETAIL} from '../../../routers/ScreenNames'; import {MEDIADETAIL} from '../../../routers/ScreenNames';
import AppText from '../../../components/AppText';
const MediaView = (props) => { const MediaView = (props) => {
// const {poster,title} = props.mediaHot; // const {poster,title} = props.mediaHot;
...@@ -74,11 +75,7 @@ const MediaView = (props) => { ...@@ -74,11 +75,7 @@ const MediaView = (props) => {
); );
} }
return ( return <View></View>;
<View>
<Text>H</Text>
</View>
);
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
......
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