Simplify conditional logic handling null fields
robertrouse opened this issue · 0 comments
robertrouse commented
Some fields are null and should be hidden. Current method is a function for each field. Simpler alternatives may be:
- single if/then function that passes in a field name and renders appropriately
- condensed logic as in:
{data.detailMap && (<Img fluid={data.detailMap.childImageSharp.fluid} className="map"/>)}