GoScrobble/web/node_modules/.cache/babel-loader/04f33b05dcde5b1bfbfac3469a9dbae4.json

1 line
7.4 KiB
JSON
Raw Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"var _jsxFileName = \"/app/src/Components/TracksForRecordTable.js\",\n _s = $RefreshSig$();\n\nimport React, { useContext, useState, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { getAlbumTracks, getArtistTracks } from '../Api/index';\nimport ScaleLoader from 'react-spinners/ScaleLoader';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst TracksForRecordTable = props => {\n _s();\n\n const [tracks, setTracks] = useState({});\n const [loading, setLoading] = useState(true);\n useEffect(() => {\n if (props.albumuuid !== undefined) {\n getAlbumTracks(props.albumuuid).then(data => {\n setTracks(data);\n setLoading(false);\n });\n } else if (props.artistuuid !== undefined) {\n getArtistTracks(props.artistuuid).then(data => {\n setTracks(data);\n setLoading(false);\n });\n }\n }, [props.albumuuid, props.artistuuid]);\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: 29,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }, this);\n }\n\n console.log(tracks);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n style: {\n textAlign: `center`\n },\n children: [\"Tracks\", /*#__PURE__*/_jsxDEV(\"br\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n style: {\n border: `1px solid #FFFFFF`,\n width: `100%`,\n display: `flex`,\n flexWrap: `wrap`,\n minWidth: `300px`,\n maxWidth: `1200px`\n },\n children: tracks && tracks.tracks && Object.keys(tracks.tracks).map(key => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n style: {\n borderBottom: `1px solid #CCC`,\n width: `100%`,\n padding: `2px`\n },\n children: /*#__PURE__*/_jsxDEV(Link, {\n to: \"/track/\" + tracks.tracks[key].uuid,\n children: [\" \", tracks.tracks[key].name]\n }, \"track\" + tracks.tracks[key].uuid, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 22\n }, this)\n }, \"box\" + tracks.tracks[key].uuid, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 23\n }, this);\n })\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 8\n }, this);\n};\n\n_s(TracksForRecordTable, \"gL+UZKRPM2bUOc7d9pxgg2EZX44=\");\n\n_c = TracksForRecordTable;\nexport default TracksForRecordTable;\n\nvar _c;\n\n$RefreshReg$(_c, \"TracksForRecordTable\");","map":{"version":3,"sources":["/app/src/Components/TracksForRecordTable.js"],"names":["React","useContext","useState","useEffect","Link","getAlbumTracks","getArtistTracks","ScaleLoader","TracksForRecordTable","props","tracks","setTracks","loading","setLoading","albumuuid","undefined","then","data","artistuuid","console","log","textAlign","border","width","display","flexWrap","minWidth","maxWidth","Object","keys","map","key","borderBottom","padding","uuid","name"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,EAAsCC,SAAtC,QAAuD,OAAvD;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,cAAT,EAAyBC,eAAzB,QAAgD,cAAhD;AACA,OAAOC,WAAP,MAAwB,4BAAxB;;;AAEA,MAAMC,oBAAoB,GAAIC,KAAD,IAAW;AAAA;;AACrC,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsBT,QAAQ,CAAC,EAAD,CAApC;AACA,QAAM,CAACU,OAAD,EAAUC,UAAV,IAAwBX,QAAQ,CAAC,IAAD,CAAtC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACb,QAAIM,KAAK,CAACK,SAAN,KAAoBC,SAAxB,EAAmC;AAChCV,MAAAA,cAAc,CAACI,KAAK,CAACK,SAAP,CAAd,CACCE,IADD,CACMC,IAAI,IAAI;AACXN,QAAAA,SAAS,CAACM,IAAD,CAAT;AACAJ,