import React, { useEffect, useState } from 'react' import { useParams } from 'react-router-dom' import fetchApi from "../utils/api" import Skeleton from 'react-loading-skeleton' ; import ArtistDetails from './ArtistDetails'; const Artist = () => { const {artistId} = useParams(); console.log(artistId); const [loading,setLoading] = useState(false); const [artistDetails,setArtistDetails] = useState(null); async function getArtistDetail (){ setLoading(true); const res = await fetchApi("artist_overview",`?id=${artistId}`) .then((res)=>{ setArtistDetails(res); setLoading(false); }) .catch((e)=>{ console.log("ARTISTDETAIL error=>",e); }) } useEffect(()=>{ getArtistDetail(); },[artistId]); return (