There are two textbox JO and PO
Need to implement above logic in react or javascript?
If i understand your question correctly you can do like this:
If i understand your question correctly you can do like this:
const role = getRole()
{(role !== "user" && role !== "admin") || role==='superadmin' && <TextBoxJo />}
{(role !== "user" && role === "admin") || role==='superadmin' && <TextBoxPo />}
you can even put these conditions and use that function, there are multiple ways to do this.