sort cryp names

This commit is contained in:
ntr
2018-10-17 13:22:48 +11:00
parent 523840a101
commit 7d70a864fd
6 changed files with 69 additions and 44 deletions
+4 -2
View File
@@ -1,9 +1,11 @@
// eslint-disable-next-line
const preact = require('preact');
const { stringSort } = require('./../utils');
const nameSort = stringSort('name');
function CrypList({ cryps, activeItem, sendCombatPve, sendItemUse }) {
if (!cryps) return <div>not ready</div>;
const crypPanels = cryps.map(cryp => (
const crypPanels = cryps.sort(nameSort).map(cryp => (
<div key={cryp.id}
className="tile is-vertical box"
@@ -1,4 +1,3 @@
// eslint-disable-next-line
const preact = require('preact');
function renderSpawnButton({ account, sendCrypSpawn }) {