Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { effects, onSetEffectData } = this.props;
if (!effects) {
return (
No effects data could be found on this duplicant.
);
}
const data = AI_EFFECT_IDS.map(effectId => {
const effectIndex = effects.findIndex(x => x.id === effectId);
const effect = effectIndex > -1 ? effects[effectIndex] : null;
return {
effectId,
effectIndex,
timeRemaining: effect ? effect.timeRemaining : null
};
});
const columns: DataTableColumn[] = [
{
Header: "Effect",
sortable: true,
filterable: true,
accessor: "effectId"
},