Remove ternary operator in React component (#23248)
Remove ternary operator in React component, unnecessary operator to render null <!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. --> - [x] I have read [freeCodeCamp's contribution guidelines](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md). - [x] My pull request has a descriptive title (not a vague title like `Update index.md`) - [x] My pull request targets the `master` branch of freeCodeCamp. - [x] None of my changes are plagiarized from another source without proper attribution. - [x] My article does not contain shortened URLs or affiliate links. If your pull request closes a GitHub issue, replace the XXXXX below with the issue number. Closes #XXXXX
This commit is contained in:
@ -74,11 +74,11 @@ function ArticleMeta({
|
|||||||
<span className='meta-item'>
|
<span className='meta-item'>
|
||||||
<FontAwesomeIcon icon={faClock} /> {`${meta.readTime} minute read`}
|
<FontAwesomeIcon icon={faClock} /> {`${meta.readTime} minute read`}
|
||||||
</span>
|
</span>
|
||||||
{viewCount >= 100 ? (
|
{viewCount >= 100 && (
|
||||||
<span className='meta-item'>
|
<span className='meta-item'>
|
||||||
<FontAwesomeIcon icon={faFreeCodeCamp} /> {`${viewCount} views`}
|
<FontAwesomeIcon icon={faFreeCodeCamp} /> {`${viewCount} views`}
|
||||||
</span>
|
</span>
|
||||||
) : null}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user