Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class Intercom extends PureComponent {
- constructor(props) {
- super(props);
- const settings = createSettingsForIntercom(props);
- if (!appId || !canUseDOM) {
- return;
- }
- loadIntercomWidget(appId, settings)
- bootIntercom(settings)
- }
- componentDidMount() {
- const {
- getHMAC,
- user,
- isLoggedIn,
- } = this.props;
- if (isLoggedIn) {
- getHMAC(user);
- } else {
- const settings = createSettingsForIntercom(this.props);
- shutdownIntercom()
- bootIntercom(settings);
- }
- }
- render() {
- return false;
- }
- }
Add Comment
Please, Sign In to add comment