From b82a37cda6b263ffbe7d9a859cda009fd1b782ae Mon Sep 17 00:00:00 2001 From: Artem Kravchenko Date: Tue, 14 Feb 2017 21:33:44 +0300 Subject: [PATCH] Intercom integration --- src/components/auth-block.js | 7 ++++++- src/pages/app.js | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/auth-block.js b/src/components/auth-block.js index 01a8614b..bee9f4fc 100644 --- a/src/components/auth-block.js +++ b/src/components/auth-block.js @@ -21,11 +21,16 @@ import { Link } from 'react-router'; import { CurrentUser as CurrentUserPropType } from '../prop-types/users'; import { API_HOST } from '../config'; import { URL_NAMES, getUrl } from '../utils/urlGenerator'; +import { IntercomAPI } from './intercom'; import Avatar from './user/avatar'; import { v2 as Dropdown } from './dropdown'; import MenuItem from './menu-item'; +function handleLogout() { + IntercomAPI('shutdown'); +} + const menuItems = username => ([ { key: 'profile', node: My profile }, @@ -33,7 +38,7 @@ const menuItems = username => ([ node: Profile settings }, { key: 'logout', node: ( -
+