React - Add class to tab. based on data

0 votes
204 views
added Nov 12, 2024 in React by lcjr Lieutenant (12,460 points)
//from this
<div className="tabs">

//to this
<div className={`tabs ${!doneDealListing || doneDealListing.data.length === 0 ? 'justify-50' : ''}`}>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...