Skip to content

Managing executable function by role in if-else condition

Notifications You must be signed in to change notification settings

wisnuciwun/RoleValidation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

RoleValidation 🍎

+ Short Documentation

🍚 Requirement :

  • .env file (on localhost testing)

👀 Usage :

  • Put this file to your helper directory folder. You can choose to make a new folder or not.
  • import this component and put it to your if-else condition

☎️ Parameters :

  • no need parameter

📎 Example :

if(RoleUser(process.env.REACT_APP_ROLE_USER))
{
  this.executeDownload()
}
else // or you can skip this
{
  console.log("no action")
}

📷 Preview :

  • try it and you will know it :)

About

Managing executable function by role in if-else condition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published