Ternary Operators for App with two User Types

arbarrington

arbarrington

Posted on November 18, 2022

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
💖 💪 🙅 🚩
arbarrington
arbarrington

Posted on November 18, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related