{"ast":null,"code":"var _jsxFileName = \"/app/src/Components/HomeBanner.js\",\n _s = $RefreshSig$();\n\nimport React, { useEffect, useState } from 'react';\nimport '../App.css';\nimport './HomeBanner.css';\nimport { getStats } from '../Api/index';\nimport ClipLoader from 'react-spinners/ClipLoader';\nimport { Link } from 'react-router-dom';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst HomeBanner = () => {\n _s();\n\n let [bannerData, setBannerData] = useState({});\n let [isLoading, setIsLoading] = useState(true);\n useEffect(() => {\n getStats().then(data => {\n if (data.users !== undefined) {\n setBannerData(data);\n setIsLoading(false);\n }\n });\n }, []);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeBanner\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeBannerItem\",\n children: /*#__PURE__*/_jsxDEV(Link, {\n to: \"/recent\",\n className: \"homeBannerItemLink\",\n children: [isLoading ? /*#__PURE__*/_jsxDEV(ClipLoader, {\n color: \"#6AD7E5\",\n size: 34\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 15\n }, this) : /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"homeBannerItemCount\",\n children: bannerData.scrobbles\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"br\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this), \"Scrobbles\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeBannerItem\",\n children: [isLoading ? /*#__PURE__*/_jsxDEV(ClipLoader, {\n color: \"#6AD7E5\",\n size: 34\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 13\n }, this) : /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"homeBannerItemCount\",\n children: bannerData.users\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"br\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this), \"Users\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeBannerItem\",\n children: [isLoading ? /*#__PURE__*/_jsxDEV(ClipLoader, {\n color: \"#6AD7E5\",\n size: 34\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }, this) : /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"homeBannerItemCount\",\n children: bannerData.tracks\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"br\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }, this), \"Tracks\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homeBannerItem\",\n children: [isLoading ? /*#__PURE__*/_jsxDEV(ClipLoader, {\n color: \"#6AD7E5\",\n size: 34\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 13\n }, this) : /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"homeBannerItemCount\",\n children: bannerData.artists\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"br\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 9\n }, this), \"Artists\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }, this);\n};\n\n_s(HomeBanner, \"AmlffXNT4+lOwkG6/RFDQPAijWY=\");\n\n_c = HomeBanner;\nexport default HomeBanner;\n\nvar _c;\n\n$RefreshReg$(_c, \"HomeBanner\");","map":{"version":3,"sources":["/app/src/Components/HomeBanner.js"],"names":["React","useEffect","useState","getStats","ClipLoader","Link","HomeBanner","bannerData","setBannerData","isLoading","setIsLoading","then","data","users","undefined","scrobbles","tracks","artists"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,OAAO,YAAP;AACA,OAAO,kBAAP;AACA,SAASC,QAAT,QAAyB,cAAzB;AACA,OAAOC,UAAP,MAAuB,2BAAvB;AACA,SAASC,IAAT,QAAqB,kBAArB;;;AAEA,MAAMC,UAAU,GAAG,MAAM;AAAA;;AACvB,MAAI,CAACC,UAAD,EAAaC,aAAb,IAA8BN,QAAQ,CAAC,EAAD,CAA1C;AACA,MAAI,CAACO,SAAD,EAAYC,YAAZ,IAA4BR,QAAQ,CAAC,IAAD,CAAxC;AAEAD,EAAAA,SAAS,CAAC,MAAM;AACdE,IAAAA,QAAQ,GACLQ,IADH,CACQC,IAAI,IAAI;AACZ,UAAIA,IAAI,CAACC,KAAL,KAAeC,SAAnB,EAA8B;AAC5BN,QAAAA,aAAa,CAACI,IAAD,CAAb;AACAF,QAAAA,YAAY,CAAC,KAAD,CAAZ;AACD;AACF,KANH;AAOD,GARQ,EAQN,EARM,CAAT;AAUA,sBACE;AAAK,IAAA,SAAS,EAAC,YAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,6BACE,QAAC,IAAD;AAAM,QAAA,EAAE,EAAC,SAAT;AAAmB,QAAA,SAAS,EAAC,oBAA7B;AAAA,mBACGD,SAAS,gBACN,QAAC,UAAD;AAAY,UAAA,KAAK,EAAC,SAAlB;AAA4B,UAAA,IAAI,E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A;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA,YAzBF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAmCD,CAjDD;;GAAMX,U;;KAAAA,U;AAmDN,eAAeA,UAAf","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport '../App.css';\nimport './HomeBanner.css';\nimport { getStats } from '../Api/index';\nimport ClipLoader from 'react-spinners/ClipLoader'\nimport { Link } from 'react-router-dom';\n\nconst HomeBanner = () => {\n let [bannerData, setBannerData] = useState({});\n let [isLoading, setIsLoading] = useState(true);\n\n useEffect(() => {\n getStats()\n .then(data => {\n if (data.users !== undefined) {\n setBannerData(data);\n setIsLoading(false);\n }\n })\n }, [])\n\n return (\n
\n
\n \n {isLoading\n ? \n : {bannerData.scrobbles}\n \n }\n
Scrobbles\n \n
\n
\n {isLoading\n ? \n : {bannerData.users}\n }\n
Users\n
\n
\n {isLoading\n ? \n : {bannerData.tracks}\n }\n
Tracks\n
\n
\n {isLoading\n ? \n : {bannerData.artists}\n }\n
Artists\n
\n
\n );\n}\n\nexport default HomeBanner;\n"]},"metadata":{},"sourceType":"module"}