style: added BaseTabs and BaseTab functional components for unified tab displaying; workflow: added .js files check when purging in prod

This commit is contained in:
Roberto Tonino
2020-11-19 18:34:51 +01:00
parent ced8650ee6
commit 5c1e5204b2
7 changed files with 82 additions and 51 deletions

View File

@@ -34,26 +34,16 @@ function formatArtistReleases(artistReleases) {
return formattedReleases
}
let artistData = {}
let cached = false
export function getArtistData(artistID) {
if (cached) {
return artistData
} else {
socket.emit('getTracklist', {
type: 'artist',
id: artistID
})
socket.emit('getTracklist', {
type: 'artist',
id: artistID
})
return new Promise((resolve, reject) => {
socket.on('show_artist', data => {
artistData = data
// cached = true
socket.off('show_artist')
resolve(data)
})
return new Promise((resolve, reject) => {
socket.on('show_artist', data => {
socket.off('show_artist')
resolve(data)
})
}
})
}