|
|
|
@ -73,10 +73,16 @@ export default function HomeScreen({ navigation }: RootStackScreenProps<'Home'>)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const loadTrendingID = async () => {
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
await dispatch(getTrendingID());
|
|
|
|
|
};
|
|
|
|
|
console.log("test1:", trendingMovies);
|
|
|
|
|
loadTrendingID();
|
|
|
|
|
}, [dispatch]);
|
|
|
|
|
|
|
|
|
|
type ItemProps = {
|
|
|
|
|
movie : Movie
|
|
|
|
@ -89,6 +95,8 @@ export default function HomeScreen({ navigation }: RootStackScreenProps<'Home'>)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<>
|
|
|
|
|
{trendingMovies.length !== 0 && (
|
|
|
|
|
<SafeAreaView style={styles.background}>
|
|
|
|
|
<ImageBackground blurRadius={20}
|
|
|
|
|
style={{
|
|
|
|
@ -160,8 +168,9 @@ return(
|
|
|
|
|
|
|
|
|
|
</TouchableOpacity>
|
|
|
|
|
</View>
|
|
|
|
|
</SafeAreaView>);
|
|
|
|
|
|
|
|
|
|
</SafeAreaView>)}
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
type BadgeGenreProps = {
|
|
|
|
|
name : String
|
|
|
|
@ -170,7 +179,7 @@ type BadgeGenreProps = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function BadgeGenre(props: BadgeGenreProps) {
|
|
|
|
|
if(props.isSelected==false){
|
|
|
|
|
if(props.isSelected===false){
|
|
|
|
|
return (
|
|
|
|
|
<View style={{paddingHorizontal: 20, marginHorizontal: 5,height: 35, backgroundColor: '#2E2E2E', borderRadius: 20, justifyContent: "center"}} >
|
|
|
|
|
<Text style={{color: "white"}}>{props.name}</Text>
|
|
|
|
|