Merge pull request #2430 from paulkaplan/fix-shared-date-display

Use falsey check for shareDate instead of checking for null.
This commit is contained in:
Paul Kaplan 2018-12-10 10:07:31 -05:00 committed by GitHub
commit 3bda6a4a4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,15 +16,14 @@ const Subactions = props => (
<div className="copyleft">&copy;</div>
{' '}
{/* eslint-disable react/jsx-sort-props */}
{props.shareDate === null ?
'Unshared' :
{props.shareDate ? (
<FormattedDate
value={Date.parse(props.shareDate)}
day="2-digit"
month="short"
year="numeric"
/>
}
) : 'Unshared'}
{/* eslint-enable react/jsx-sort-props */}
</div>
<FlexRow className="action-buttons">