halfmoonui / halfmoon

Halfmoon is a highly customizable, drop-in Bootstrap replacement. It comes with three built-in core themes, with dark mode support for all themes and components.
https://www.gethalfmoon.com
MIT License
3.01k stars 118 forks source link

toggleSidebar When open a new Link React #113

Closed brunolcarlos closed 3 years ago

brunolcarlos commented 3 years ago

Hi, I'm getting some difficult to solve this problem. When the page load at first time the Sidebar keep closed but when i move ahead clicking on some Link the Sidebar keep open and the action onClick={() => halfmoon.toggleSidebar()} does't work.

const halfmoon = require("halfmoon");

useEffect(() => {
    halfmoon.onDOMContentLoaded();
}, [halfmoon]);

I don't know how to solve it