Adapt components with API response
This commit is contained in:
@@ -13,8 +13,8 @@ import {formatKuveti} from '../../lib/kuveti'
|
||||
import MizikLyen from './mizik-lyen'
|
||||
|
||||
function grupPawol(pawol) {
|
||||
const pawolTrie = pawol.sort((a, b) => a.attributes.titre.localeCompare(b.attributes.titre, 'fr', {sensitivity: 'base'}))
|
||||
const grupPawol = groupBy(pawol, anPawol => anPawol.attributes.titre[0].toUpperCase())
|
||||
const pawolTrie = pawol.sort((a, b) => a.titre.localeCompare(b.titre, 'fr', {sensitivity: 'base'}))
|
||||
const grupPawol = groupBy(pawol, anPawol => anPawol.titre[0].toUpperCase())
|
||||
const grupCounts = Object.values(grupPawol).map(anPawol => anPawol.length)
|
||||
const grup = Object.keys(grupPawol)
|
||||
grup.sort((a, b) => a[0].localeCompare(b[0], 'fr', {sensitivity: 'base'}))
|
||||
@@ -33,7 +33,7 @@ export default function MizikLis({niAwtis, paroles, meteEsMobilOuve}) {
|
||||
groupContent={index => <div>{grup[index]}</div>}
|
||||
itemContent={index => {
|
||||
const anPawol = pawol[index]
|
||||
const {couverture} = anPawol.attributes
|
||||
const {couverture} = anPawol
|
||||
const kuvetiFormat = formatKuveti(couverture)
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user