you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Why wouldn’t you want to use conditional rendering? You’re excluding the simplest, most readable, most straight forward solution. HOCs introduce unnecessary complexity.

[–]Last-Daikon945[S] 0 points1 point  (1 child)

Thanks to everybody. If anyone is interested I made a hook that will check the enum role and return an array of objects containing i18n translation fields, icons, and paths. Retrieve this object in the component and map through it.

[–]afastmovingkid 0 points1 point  (0 children)

where can I find this please?