Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
useEffect(() => {
if (isDesktop) {
dispatch(setSidebarVisibility(true)); // FIXME renders with a closed sidebar at first
}
}, [isDesktop, dispatch]);
const open = useSelector(state => state.admin.ui.sidebarOpen);
const toggleSidebar = () => dispatch(setSidebarVisibility(!open));
const classes = useStyles({ open });
const handleClose = () => dispatch(setSidebarVisibility(false));
const toggleSidebar = () => dispatch(setSidebarVisibility(!open));