mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
|
{"ast":null,"code":"var _jsxFileName = \"/app/src/Pages/Home.js\",\n _s = $RefreshSig$();\n\nimport logo from '../logo.png';\nimport '../App.css';\nimport './Home.css';\nimport HomeBanner from '../Components/HomeBanner';\nimport TopTable from '../Components/TopTable';\nimport React, { useState, useEffect } from 'react';\nimport { getTopTracks, getTopArtists } from '../Api/index';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const [topArtists, setTopArtists] = useState({});\n const [topTracks, setTopTracks] = useState({});\n const [tableLoading, setTableLoading] = useState(true);\n useEffect(() => {\n // Fetch top tracks\n // if (topTracks && Object.keys(topTracks).length === 0) {\n // getTopTracks(\"0\", 7)\n // .then(data => {\n // setTopTracks(data.tracks)\n // })\n // }\n // Fetch top artists\n if (topArtists && Object.keys(topArtists).length === 0) {\n getTopArtists(\"0\", 7).then(data => {\n setTopArtists(data.artists);\n });\n }\n\n setTableLoading(false);\n }, [topTracks, topArtists]);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageWrapper\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n children: /*#__PURE__*/_jsxDEV(\"img\", {\n src: logo,\n className: \"App-logo\",\n alt: \"logo\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeItem\",\n children: [/*#__PURE__*/_jsxDEV(\"p\", {\n className: \"homeText\",\n children: \"GoScrobble is an open source music scrobbling service.\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n className: \"subHomeText\",\n children: \"Supports Spotify, Jellyfin, Navidrome / Subsonic / Airsonic.\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(HomeBanner, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(TopTable, {\n type: \"artist\",\n items: topArtists,\n loading: tableLoading,\n extraText: \"this week\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"G13JvKa3FG2kY4RDX4xE2MPcpzU=\");\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["/app/src/Pages/Home.js"],"names":["logo","HomeBanner","TopTable","React","useState","useEffect","getTopTracks","getTopArtists","Home","topArtists","setTopArtists","topTracks","setTopTracks","tableLoading","setTableLoading","Object","keys","length","then","data","artists"],"mappings":";;;AAAA,OAAOA,IAAP,MAAiB,aAAjB;AACA,OAAO,YAAP;AACA,OAAO,YAAP;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,YAAT,EAAuBC,aAAvB,QAA4C,cAA5C;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM,CAACC,UAAD,EAAaC,aAAb,IAA8BN,QAAQ,CAAC,EAAD,CAA5C;AACA,QAAM,CAACO,SAAD,EAAYC,YAAZ,IAA4BR,QAAQ,CAAC,EAAD,CAA1C;AACA,QAAM,CAACS,YAAD,EAAeC,eAAf,IAAkCV,QAAQ,CAAC,IAAD,CAAhD;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd;AACA;AACA;AACA;AACA;AACA;A
|