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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.