diff --git a/src/components/ExplorerIntro.js b/src/components/ExplorerIntro.js index e655669b..078b7623 100644 --- a/src/components/ExplorerIntro.js +++ b/src/components/ExplorerIntro.js @@ -12,11 +12,12 @@ const ExplorerIntro = ({ agency, crime, place, ucr, until }) => { if (agency) { return ( ) } diff --git a/src/components/ExplorerIntroAgency.js b/src/components/ExplorerIntroAgency.js index d7aa71f1..ab51d06f 100644 --- a/src/components/ExplorerIntroAgency.js +++ b/src/components/ExplorerIntroAgency.js @@ -1,22 +1,42 @@ +import lowerCase from 'lodash.lowercase' import startCase from 'lodash.startcase' +import upperFirst from 'lodash.upperfirst' import PropTypes from 'prop-types' import React from 'react' +import Term from './Term' import { nibrsTerm, srsTerm } from './Terms' +import mapCrimeToGlossaryTerm from '../util/glossary' -const ExplorerIntroAgency = ({ county, name, state, type, hasNibrs }) => { +const ExplorerIntroAgency = ({ + county, + crime, + hasNibrs, + name, + state, + type, +}) => { const showCounty = (county && type === 'City') || type === 'University or College' + const crimeTerm = ( + + {upperFirst(lowerCase(crime))} + + ) + return (

The {startCase(name)} law enforcement agency is located in {' '} {showCounty && `${county} County, `} - {startCase(state)}. This agency reports + {startCase(state)}. + {' '} + {crimeTerm} totals for this agency are voluntarily submitted to the + FBI using {' '} {hasNibrs ? nibrsTerm : srsTerm} {' '} - data to the FBI. + reports.

) }