// @ts-ignore import React, {useEffect} from 'react'; import { View, Image, Text, StyleSheet } from 'react-native'; import {getAlbumByArtist, getArtistInfo} from "../../redux/actions/action"; import {useDispatch} from "react-redux"; import ArtistList from "../Album/AlbumList"; export default function ArtistPage({ route }) { const artist = route.params.artist; const dispatch = useDispatch(); useEffect(() => { const load = async () => { // @ts-ignore await dispatch(getArtistInfo(artist)); // @ts-ignore await dispatch(getAlbumByArtist(artist)); }; load(); }) return ( {artist.name} {artist.bio} Liste Album ); }; const styles = StyleSheet.create({ container: { marginTop:10, alignItems: 'center' }, image: { width: 100, height: 100, marginBottom: 10, borderRadius: 100, borderWidth: 2, borderColor: 'black' }, name: { fontSize: 30, fontWeight: 'bold', textAlign: 'center', }, bio:{ }, titre:{ fontSize: 20, fontWeight: "bold" } });