import React from 'react' import { connect } from 'react-redux' const CharacterInfo = ({ character, error, fetchCharacter, isFetchedOnServer = false }) => (
{ error ?

We encountered and error.

:

Character: {character.name}

birth year: {character.birth_year}

gender: {character.gender}

skin color: {character.skin_color}

eye color: {character.eye_color}

}

(was character fetched on server? -{' '} {isFetchedOnServer.toString()})

) export default connect( state => ({ character: state.character, error: state.error, isFetchedOnServer: state.isFetchedOnServer }) )(CharacterInfo)