mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
3.7 KiB
JSON
1 line
3.7 KiB
JSON
{"ast":null,"code":"var _jsxFileName = \"/app/src/Pages/Recent.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useEffect } from 'react';\nimport '../App.css';\nimport './Recent.css';\nimport RecentScrobbleTable from '../Components/RecentScrobbleTable';\nimport { getRecentScrobbles } from '../Api/index';\nimport ScaleLoader from 'react-spinners/ScaleLoader';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Recent = route => {\n _s();\n\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState({});\n useEffect(() => {\n if (loading) {\n getRecentScrobbles().then(data => {\n setData(data);\n setLoading(false);\n });\n }\n }, [loading]);\n\n if (loading) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageWrapper\",\n children: /*#__PURE__*/_jsxDEV(ScaleLoader, {\n color: \"#6AD7E5\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this);\n }\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageWrapper\",\n children: [\"Last 50 Scrobbles\", /*#__PURE__*/_jsxDEV(RecentScrobbleTable, {\n data: data.items\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 5\n }, this);\n};\n\n_s(Recent, \"S2S601Rg9QIjK0Aph/7Sqrrdt3U=\");\n\n_c = Recent;\nexport default Recent;\n\nvar _c;\n\n$RefreshReg$(_c, \"Recent\");","map":{"version":3,"sources":["/app/src/Pages/Recent.js"],"names":["React","useState","useEffect","RecentScrobbleTable","getRecentScrobbles","ScaleLoader","Recent","route","loading","setLoading","data","setData","then","items"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,YAAP;AACA,OAAO,cAAP;AACA,OAAOC,mBAAP,MAAgC,mCAAhC;AACA,SAASC,kBAAT,QAAmC,cAAnC;AACA,OAAOC,WAAP,MAAwB,4BAAxB;;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAW;AAAA;;AACxB,QAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBR,QAAQ,CAAC,IAAD,CAAtC;AACA,QAAM,CAACS,IAAD,EAAOC,OAAP,IAAkBV,QAAQ,CAAC,EAAD,CAAhC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIM,OAAJ,EAAa;AACXJ,MAAAA,kBAAkB,GACfQ,IADH,CACQF,IAAI,IAAI;AACZC,QAAAA,OAAO,CAACD,IAAD,CAAP;AACAD,QAAAA,UAAU,CAAC,KAAD,CAAV;AACD,OAJH;AAKC;AAEJ,GATQ,EASN,CAACD,OAAD,CATM,CAAT;;AAWA,MAAIA,OAAJ,EAAa;AACX,wBACE;AAAK,MAAA,SAAS,EAAC,aAAf;AAAA,6BACE,QAAC,WAAD;AAAa,QAAA,KAAK,EAAC;AAAnB;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;;AAED,sBACE;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA,iDAEE,QAAC,mBAAD;AAAqB,MAAA,IAAI,EAAEE,IAAI,CAACG;AAAhC;AAAA;AAAA;AAAA;AAAA,YAFF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CA7BD;;GAAMP,M;;KAAAA,M;AA+BN,eAAeA,MAAf","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport '../App.css';\nimport './Recent.css';\nimport RecentScrobbleTable from '../Components/RecentScrobbleTable'\nimport { getRecentScrobbles } from '../Api/index'\nimport ScaleLoader from 'react-spinners/ScaleLoader';\n\nconst Recent = (route) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState({});\n\n useEffect(() => {\n if (loading) {\n getRecentScrobbles()\n .then(data => {\n setData(data);\n setLoading(false);\n })\n }\n\n }, [loading])\n\n if (loading) {\n return (\n <div className=\"pageWrapper\">\n <ScaleLoader color=\"#6AD7E5\" />\n </div>\n )\n }\n\n return (\n <div className=\"pageWrapper\">\n Last 50 Scrobbles\n <RecentScrobbleTable data={data.items} />\n </div>\n );\n}\n\nexport default Recent;"]},"metadata":{},"sourceType":"module"} |