import * as React from 'react' import type { PJ } from '@lastres/pj' import PJHealthLikeBar from '@lastres/components/pj-health-like-bar' interface PJListSelectionProps { pjs: PJ[] | null setSelectedPJ: (set: PJ | null) => void } export default function PJListSelection (props: PJListSelectionProps): JSX.Element { const pjs = props.pjs if (pjs === null) { return ( <>

Aun no se han descargado los pjs, espera un segundo...

) } return ( <> { pjs.map((item, i) => { props.setSelectedPJ(item) }} href="#" key={i}> {item.full_name} {item.short_name} {item.nick} ) } ) }