How to use the network/CookieManager.getCookie function in network

To help you get started, we’ve selected a few network examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github soaple / stickyboard / src / components / base / Layout.js View on Github external
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',
        }
    }
github soaple / stickyboard / src / components / base / Layout.js View on Github external
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',
        }
    }
github soaple / stickyboard / src / components / base / PageBase.js View on Github external
initializeLayout = () => {
        const userId = CookieManager.getCookie('userId');
        if (userId) {
            this.props.showMessageSnackbar('Loading...');
            ApiManager.readUserLayout(
                userId,
                window.location.pathname,
                this.readUserLayoutCallback);
        } else {
            this.setInitialLayout();
        }
    }
github soaple / stickyboard / src / components / base / PageBase.js View on Github external
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);
        }
    }