render() {
        let inactive = ''
        let leftLinkButton = null;
        let rightLinkButton = null;
        if (this.props.leftLink(this.props.item.name)) {
            leftLinkButton = <Link id={"leftLink-" + this.props.item.name} to={this.props.leftLink(this.props.item.name)} style={{ textDecoration: 'none' }}><div className="link-container left-link"></div><div className="left-link side-link"></div></Link>;
        }
        if (this.props.rightLink(this.props.item.name)) {
            rightLinkButton = <Link id={"rightLink-" + this.props.item.name} to={this.props.rightLink(this.props.item.name)} style={{ textDecoration: 'none' }}><div className="link-container right-link"></div><div className="right-link side-link"></div></Link>
        }
        let setOfValues = [];
        for (let trait in this.props.item) {
            if(trait != "inactive" && trait != "picture" && trait != "headshot" && trait != "items" && trait != "owner"){
                setOfValues.push(
                <div className="info-field">
                    <br />
                    <span style={{ 'display': 'inline-flex' }}>{this.capitalizeFirstLetter(trait) + ': '}</span>
                    {(this.props.item[trait.toString()] ? <span style={{ 'display': 'inherit', 'cursor': 'pointer' }} onClick={(filter, name) => this.funcForTraitSearch(trait.toString(), this.props.item[trait.toString()])} >{this.props.item[trait.toString()]}</span> : <span>'N/A'</span>)}
                </div>
                );
            } else if(trait == "items"){
                setOfValues.push(<div className="info-field">
                    <br />
                    {(this.props.item[trait.toString()] ? <span style={{ 'display': 'inline-block', 'cursor': 'pointer' }} >{this.props.item[trait]}</span> : <span>'N/A'</span>)}
                </div>);
            } else if(trait == "owner"){
                setOfValues.push(<div className="owner-field">
                <div><div>{this.capitalizeFirstLetter(trait) + ': '+ this.props.item[trait.toString()]}</div></div>
                    <div className="owner-headshot">{ this.props.getOwner(this.props.item[trait], trait)}</div>
                </div>);
            } else if(trait == "inactive"){
                if(this.props.item[trait.toString()]){
                    inactive = " inactive";
                }
            }
        }

        return (
            <div className="result-page" id={this.props.item.name}>
                <div className="inner-information">
                    <img src={this.props.item.picture} id={"img-" + this.props.item.name} className={"relevant-image-vertical" + inactive}>
                    </img>
                    <br />
                    <div className="text-field">
                        {setOfValues}
                    </div>
                </div>
                {leftLinkButton ? leftLinkButton : null}
                {rightLinkButton ? rightLinkButton : null}
            </div>
        );
    }
//Should have item in props.

Should have item in props.
Should have item in props .
render() {
        let inactive = ''
        let leftLinkButton = null;
        let rightLinkButton = null;
        if (this.props.leftLink(this.props.item.name)) {
            leftLinkButton = <Link id={"leftLink-" + this.props.item.name} to={this.props.leftLink(this.props.item.name)} style={{ textDecoration: 'none' }}><div className="link-container left-link"></div><div className="left-link side-link"></div></Link>;
        }
        if (this.props.rightLink(this.props.item.name)) {
            rightLinkButton = <Link id={"rightLink-" + this.props.item.name} to={this.props.rightLink(this.props.item.name)} style={{ textDecoration: 'none' }}><div className="link-container right-link"></div><div className="right-link side-link"></div></Link>
        }
        let setOfValues = [];
        for (let trait in this.props.item) {
            if(trait != "inactive" && trait != "picture" && trait != "headshot" && trait != "items" && trait != "owner"){
                setOfValues.push(
                <div className="info-field">
                    <br />
                    <span style={{ 'display': 'inline-flex' }}>{this.capitalizeFirstLetter(trait) + ': '}</span>
                    {(this.props.item[trait.toString()] ? <span style={{ 'display': 'inherit', 'cursor': 'pointer' }} onClick={(filter, name) => this.funcForTraitSearch(trait.toString(), this.props.item[trait.toString()])} >{this.props.item[trait.toString()]}</span> : <span>'N/A'</span>)}
                </div>
                );
            } else if(trait == "items"){
                setOfValues.push(<div className="info-field">
                    <br />
                    {(this.props.item[trait.toString()] ? <span style={{ 'display': 'inline-block', 'cursor': 'pointer' }} >{this.props.item[trait]}</span> : <span>'N/A'</span>)}
                </div>);
            } else if(trait == "owner"){
                setOfValues.push(<div className="owner-field">
                <div><div>{this.capitalizeFirstLetter(trait) + ': '+ this.props.item[trait.toString()]}</div></div>
                    <div className="owner-headshot">{ this.props.getOwner(this.props.item[trait], trait)}</div>
                </div>);
            } else if(trait == "inactive"){
                if(this.props.item[trait.toString()]){
                    inactive = " inactive";
                }
            }
        }
        return (
            <div className="result-page" id={this.props.item.name}>
                <div className="inner-information">
                    <img src={this.props.item.picture} id={"img-" + this.props.item.name} className={"relevant-image-vertical" + inactive}>
                    </img>
                    <br />
                    <div className="text-field">
                        {setOfValues}
                    </div>
                </div>
                {leftLinkButton ? leftLinkButton : null}
                {rightLinkButton ? rightLinkButton : null}
            </div>
        );
    }
render ( ) { let inactive = '' let leftLinkButton = null ; let rightLinkButton = null ; if ( this . props . leftLink ( this . props . item . name ) ) { leftLinkButton = < Link id = { "leftLink-" + this . props . item . name } to = { this . props . leftLink ( this . props . item . name ) } style = { { textDecoration : 'none' } } > < div className = "link-container left-link" > < / div > < div className = "left-link side-link" > < / div > < / Link > ; } if ( this . props . rightLink ( this . props . item . name ) ) { rightLinkButton = < Link id = { "rightLink-" + this . props . item . name } to = { this . props . rightLink ( this . props . item . name ) } style = { { textDecoration : 'none' } } > < div className = "link-container right-link" > < / div > < div className = "right-link side-link" > < / div > < / Link > } let setOfValues = [ ] ; for ( let trait in this . props . item ) { if ( trait != "inactive" && trait != "picture" && trait != "headshot" && trait != "items" && trait != "owner" ) { setOfValues . push ( < div className = "info-field" > < br / > < span style = { { 'display' : 'inline-flex' } } > { this . capitalizeFirstLetter ( trait ) + ': ' } < / span > { ( this . props . item [ trait . toString ( ) ] ? < span style = { { 'display' : 'inherit' , 'cursor' : 'pointer' } } onClick = { ( filter , name ) => this . funcForTraitSearch ( trait . toString ( ) , this . props . item [ trait . toString ( ) ] ) } > { this . props . item [ trait . toString ( ) ] } < / span > : < span > 'N/A' < / span > ) } < / div > ) ; } else if ( trait == "items" ) { setOfValues . push ( < div className = "info-field" > < br / > { ( this . props . item [ trait . toString ( ) ] ? < span style = { { 'display' : 'inline-block' , 'cursor' : 'pointer' } } > { this . props . item [ trait ] } < / span > : < span > 'N/A' < / span > ) } < / div > ) ; } else if ( trait == "owner" ) { setOfValues . push ( < div className = "owner-field" > < div > < div > { this . capitalizeFirstLetter ( trait ) + ': ' + this . props . item [ trait . toString ( ) ] } < / div > < / div > < div className = "owner-headshot" > { this . props . getOwner ( this . props . item [ trait ] , trait ) } < / div > < / div > ) ; } else if ( trait == "inactive" ) { if ( this . props . item [ trait . toString ( ) ] ) { inactive = " inactive" ; } } } return ( < div className = "result-page" id = { this . props . item . name } > < div className = "inner-information" > < img src = { this . props . item . picture } id = { "img-" + this . props . item . name } className = { "relevant-image-vertical" + inactive } > < / img > < br / > < div className = "text-field" > { setOfValues } < / div > < / div > { leftLinkButton ? leftLinkButton : null } { rightLinkButton ? rightLinkButton : null } < / div > ) ; }
Should have item in props.
Should have item in props .