Remove number "0" being rendered unintentionally (#84)

`canCreate && (<Link...)` evaluates to a fals-ey value and renders as the number "0". The proper way to achieve not showing anything is via a ternary operator.
This commit is contained in:
Danny Povolotski 2021-07-02 22:49:13 +03:00 committed by GitHub
parent 2fd58e5b2b
commit ecb99be7c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -26,9 +26,9 @@ const UserActions = () => {
{/* <Link to={`#`}>
<Button className="app-btn">Bids</Button>
</Link> */}
{canCreate && (<Link to={`/art/create`}>
{canCreate ? (<Link to={`/art/create`}>
<Button className="app-btn">Create</Button>
</Link>)}
</Link>) : null}
<Link to={`/auction/create/0`}>
<Button className="connector" type="primary" >Sell</Button>
</Link>