Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: Const.NOTI_TYPE_WARNING,
title: 'CCU is too big!',
time: new Date(currentTimeMillis - Const.TIME_MILLIS_3_DAYS),
},
],
// Permission
permissionKeyArray: [],
// Drawer
menuDrawerOpen: false,
notiDrawerOpen: false,
// Theme menu
themeMenuAnchorElem: null,
// User menu
userMenuAnchorElem: null,
// Auth
auth: CookieManager.getCookie('userId') !== undefined,
isSuperuser: CookieManager.getCookie('isSuperuser') === 'true',
}
}
title: 'CCU is too big!',
time: new Date(currentTimeMillis - Const.TIME_MILLIS_3_DAYS),
},
],
// Permission
permissionKeyArray: [],
// Drawer
menuDrawerOpen: false,
notiDrawerOpen: false,
// Theme menu
themeMenuAnchorElem: null,
// User menu
userMenuAnchorElem: null,
// Auth
auth: CookieManager.getCookie('userId') !== undefined,
isSuperuser: CookieManager.getCookie('isSuperuser') === 'true',
}
}
initializeLayout = () => {
const userId = CookieManager.getCookie('userId');
if (userId) {
this.props.showMessageSnackbar('Loading...');
ApiManager.readUserLayout(
userId,
window.location.pathname,
this.readUserLayoutCallback);
} else {
this.setInitialLayout();
}
}
onSaveLayout = () => {
const userId = CookieManager.getCookie('userId');
if (userId) {
ApiManager.updateUserLayout(
userId,
window.location.pathname,
JSON.stringify(this.state.layouts),
JSON.stringify(this.state.blocks),
this.updateUserLayoutCallback);
}
}