Skip to content

Commit

Permalink
Merge pull request #1718 from COVID19Tracking/kevee/fix-hhs-invalid
Browse files Browse the repository at this point in the history
HHS map: Hide date range if missing
  • Loading branch information
kevee authored Jan 6, 2021
2 parents 44e5dde + 9df195a commit ac9e595
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/components/pages/data/hhs-facilities/map/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,19 @@ const Legend = ({ mapLayer, setLayer, date }) => (
</button>
</div>
<p className={legendStyles.dates}>
Data for <FormatDate date={date} format="LLLL d, yyyy" /> to{' '}
<FormatDate
date={DateTime.fromISO(date)
.plus({ days: 6 })
.toISO()}
format="LLLL d, yyyy"
/>
{date ? (
<>
Data for <FormatDate date={date} format="LLLL d, yyyy" /> to{' '}
<FormatDate
date={DateTime.fromISO(date)
.plus({ days: 6 })
.toISO()}
format="LLLL d, yyyy"
/>
</>
) : (
<>&nbsp;</>
)}
</p>
</Col>
<Col width={[4, 6, 6]} paddingLeft={[0, 0, 16]}>
Expand Down

0 comments on commit ac9e595

Please sign in to comment.