From 33ccd4107b772d30ec38a3efab37e889eb63ec12 Mon Sep 17 00:00:00 2001 From: Eric Kao Date: Mon, 3 Dec 2018 15:35:14 -0800 Subject: [PATCH] Remove ternary operator in React component (#23248) Remove ternary operator in React component, unnecessary operator to render null - [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 --- client/src/templates/News/components/ArticleMeta.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/templates/News/components/ArticleMeta.js b/client/src/templates/News/components/ArticleMeta.js index 06472409a0..d016c41ecf 100644 --- a/client/src/templates/News/components/ArticleMeta.js +++ b/client/src/templates/News/components/ArticleMeta.js @@ -74,11 +74,11 @@ function ArticleMeta({ {`${meta.readTime} minute read`} - {viewCount >= 100 ? ( + {viewCount >= 100 && ( {`${viewCount} views`} - ) : null} + )} );