Open-source by Keenthemes!Support our KtUI and ReUI open-source projects and help with growth.
Star on Github

Sidebar manipulations


Hey i'm using metronics 9 with react and i want to conditionally re-render the sidebar based on a global-context in the react app (global context is manipulated in some other file) along with that i'm also verifying the role and route through an api that is called every time when any route is changes.
this is causing issues in this whole process. can you please suggest me any better ways to do the same thing.


Text formatting options
Submit

Replies (1)


Hi,

Sorry for the late reply.

Could you please provide us more info ? Are you using Metronic v9.2.0 React/Vite with https://reui.io ?

Basically you can wrap the layout with your own context and manipulate with the sidebar as per your project requirements. You can add root layout level context and do your logic there. What is preventing you applying this ? Which demo are you using ? Our demo layouts are quite easy too customize, it has a menu iteration code where u can apply your ACL logic.

Please provide us more info and we will guide you further.

Regards,
Sean


Text formatting options
Submit
Text formatting options
Submit