Add Genres as "Chips" in Album details and Song details

This commit is contained in:
Deluan
2021-07-17 13:15:32 -04:00
committed by Deluan Quintão
parent e2233779f1
commit 054b5eafdb
12 changed files with 171 additions and 98 deletions
+1
View File
@@ -1,5 +1,6 @@
export * from './baseUrl'
export * from './docsUrl'
export * from './formatters'
export * from './intersperse'
export * from './notifications'
export * from './openInNewTab'
+20
View File
@@ -0,0 +1,20 @@
/* intersperse: Return an array with the separator interspersed between
* each element of the input array.
*
* > _([1,2,3]).intersperse(0)
* [1,0,2,0,3]
*
* From: https://stackoverflow.com/a/23619085
*/
export const intersperse = (arr, sep) => {
if (arr.length === 0) {
return []
}
return arr.slice(1).reduce(
function (xs, x, i) {
return xs.concat([sep, x])
},
[arr[0]]
)
}