const preact = require('preact');
const { stringSort } = require('./../utils');
const nameSort = stringSort('name');
function CrypList({
cryps, activeItem, sendGamePve, sendGamePvp, sendItemUse,
}) {
if (!cryps) return
not ready
;
const crypPanels = cryps.sort(nameSort).map(cryp => (
sendItemUse(cryp.id)} >
{cryp.name}
Level {cryp.lvl}
{cryp.hp.value} / {cryp.stamina.value} HP
{cryp.xp} / {Math.pow(2, cryp.lvl + 1)} XP
));
return (
{crypPanels}
);
}
module.exports = CrypList;