doc: add conditional rendering to Hello text

This commit is contained in:
Leon Xu
2022-05-07 13:14:54 -07:00
parent e2a136a4ef
commit 2e512535a0
+3 -1
View File
@@ -32,7 +32,9 @@ function Header() {
<nav className="header__nav">
<Link to={!user && "/login"}>
<section onClick={authHandle} className="header__option">
<span className="header__optionLineOne">Hello</span>
<span className="header__optionLineOne">
Hello, {!user ? "Guest" : user.email}
</span>
<span className="header__optionLineTwo">
{user ? "Sign Out" : "Sign In"}
</span>