DEV Community

arbarrington
arbarrington

Posted on

Ternary Operators for App with two User Types

I created an app where users are either a farmer or consumer

{!user.producer?
        <h1>Favorite Producers</h1>
      :<>
      <h1>Consumer Analytics</h1>
      <SalesByMonth user={user} partialOrderComplete={partialOrderComplete} myOrders={myOrders} myOrdersOut={myOrdersOut}/>
      </>}
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
f53 profile image
F53

beautiful