- I am attempting to display the values stored in the sports property.
- So, I inserted a console log within the sports property.
- However, an error is being thrown:
Syntax error: C:/codebase/src/containers/sports.js: Unexpected token, expected , (367:22)
- I looked into ways to display the values - should I place if conditions inside a method and then call it here?
- Is there a simpler method to display player.west.sports?
- Below is the snippet of my code:
<GeoJSON
data={West}
onEachFeature={this.onEachFeature}
ref="west"
style={
map.region === "west" ? this.getNewStyle : this.getWhiteStyle
}
sports={
{console.log(" player.west.sports--->", player.west.sports)}
map.region === "west" ? (
player.west.sports
) : (
player.white.sports
)
}
/>