{"version":3,"file":"index.55543b4e.js","sources":["../../../app/frontend/entrypoints/page/home/section/artists/index.tsx"],"sourcesContent":["import { useState, useEffect } from 'react'\nimport axios, { AxiosResponse, AxiosError } from 'axios'\n\nimport Artist from './artist'\n\ntype Artist = {\n public_id: string\n display_name: string\n comment: string\n gift_detail: string\n icon_uri: string\n music_count: number\n market_music_count: number\n generative_count: number\n}\n\nfunction HomeArtists() {\n const [artists, setArtists] = useState()\n\n useEffect(() => {\n fetchHomeArtists()\n }, [])\n\n const fetchHomeArtists = () => {\n axios({\n method: 'GET',\n url: `${import.meta.env.VITE_API_BASE_URI}/api/v1/home/artists`,\n })\n .then((response: AxiosResponse<{ artists: Artist[] }>) => {\n setArtists(response.data.artists)\n })\n .catch((error: AxiosError<{ error: string }>) => {\n console.error('error', error)\n })\n }\n\n return (\n
\n {artists && artists.length > 0 ? (\n artists.map((artist) => (\n \n ))\n ) : (\n <>\n )}\n
\n )\n}\n\nexport default HomeArtists\n"],"names":["HomeArtists","artists","setArtists","useState","useEffect","fetchHomeArtists","axios","method","url","VITE_API_BASE_URI","then","response","data","catch","error","length","map","artist","_jsx","Artist","public_id","_Fragment"],"mappings":"+SAgBA,SAASA,GAAc,CACrB,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAoB,SAAA,EAElDC,EAAAA,UAAU,IAAM,CACIC,GACpB,EAAG,CAAE,CAAA,EAEL,MAAMA,EAAmB,IAAM,CACvBC,EAAA,CACJC,OAAQ,MACRC,IAAM,8CAAkBC,CACzB,EACEC,KAAMC,GAAmD,CAC7CA,EAAAA,EAASC,KAAKX,OAAO,CAAA,CACjC,EACAY,MAAOC,GAAyC,CACvCA,QAAAA,MAAM,QAASA,CAAK,CAAA,CAC7B,CAAA,EAGL,SACE,MAAA,CAAK,UAAU,UAAS,SACrBb,GAAWA,EAAQc,OAAS,EAC3Bd,EAAQe,IACNC,GAAAC,EAACC,EAAM,CAAwB,OAAAF,CAAA,EAAlBA,EAAOG,SAAS,CAC9B,EAEDF,EAAAG,EAAA,CAAA,CAAA,CAAA,CAEE,CAEV"}