async componentDidMount()

in javascript/customAgentDesktop-AzureSSO/webApp/src/components/Ccp/Ccp.tsx [40:70]


    async componentDidMount() {
        this._logger.debug(this._name + ': componentDidMount');

        const container = this._ccpContainer.current;
        if (container) {
            connect.core.initCCP(container, {
                ccpUrl: `${config.connectLoginURL}/connect/ccp-v2/`,
                loginUrl: config.azureAD.ccpUserAccessURL,
                loginPopup: true,
                loginPopupAutoClose: true,
                loginOptions: {
                    autoClose: true
                },
                softphone: {
                    allowFramedSoftphone: true
                }
            });
        } else {
            throw new Error('ccpContainer is null.  This should never happen');
        }
        
        connect.core.onAuthFail( () => {
            throw new Error('Connect onAuthFail occurred.  This should never happen');
        });
        connect.core.onAccessDenied( () => {
            throw new Error('Connect onAccessDenied occurred.  This should never happen');
        });
        
        connect.agent(this.agentHandler);
        connect.contact(this.contactHandler);
    }