From ae599e0132ab8de35772ccd878fc59c79b05b383 Mon Sep 17 00:00:00 2001 From: Allan Szewczyk Date: Mon, 20 Sep 2021 00:09:41 +0900 Subject: [PATCH] changed null ternirary to logical && --- src/App.jsx | 4 ++-- src/components/Game.jsx | 2 +- src/components/Navbar.jsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index a7dad6a..7454827 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -63,8 +63,8 @@ const App = () => { score={score} start={showStart} /> - {showStart ? : null} - {showLogin ? : null} + {showStart && } + {showLogin && } {renderGame()} ) diff --git a/src/components/Game.jsx b/src/components/Game.jsx index e9a72b0..1f10b8c 100644 --- a/src/components/Game.jsx +++ b/src/components/Game.jsx @@ -39,7 +39,7 @@ const Game = (props) => {
{showEndGame ? :
} - Logo + Logo
{ return (
Logo - {score >= 0 ?
TRIES REMAINING: {score}
: null} - {start ? null :
NAME: {name}
} + {score >= 0 &&
TRIES REMAINING: {score}
} + {!start &&
NAME: {name}
}
) }