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:
parent
2fd58e5b2b
commit
ecb99be7c8
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue