May 2018
Intermediate to advanced
470 pages
13h 54m
English
In the navigation bar, to conditionally display a link to My Shops, which is only visible to the signed-in users who are also sellers, we will update the Menu component, as follows, within the previous code that only renders when a user is signed in.
mern-marketplace/client/core/Menu.js:
{auth.isAuthenticated().user.seller && (<Link to="/seller/shops"> <Button color = {isPartActive(history, "/seller/")}> My Shops </Button> </Link>)}
Read now
Unlock full access