What you provide to the style attribute must be an object. Since we are writing js code in jsx between braces, you will insert an object there.
Remember that you need to camel all css details. (font-size ==> fontSize)
<img src={this.state.photo} alt="" style={ isLoggedIn ? { display:'block'} : {display : 'none'} } />
or
<img src={this.state.photo} alt="" style={ { display: isLoggedIn ? 'block' : 'none' } } />
source share