chore: Move referrerHost to appConfig store (#3433)

This commit is contained in:
Pranav Raj S 2021-11-22 15:05:29 +05:30 committed by GitHub
parent 1be7c2d72c
commit 1a8b8f0900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 138 additions and 81 deletions

View file

@ -1,4 +1,4 @@
import { addClass, toggleClass, wootOn } from './DOMHelpers';
import { addClass, removeClass, toggleClass, wootOn } from './DOMHelpers';
import { IFrameHelper } from './IFrameHelper';
import { BUBBLE_DESIGN } from './constants';
@ -74,3 +74,13 @@ export const onBubbleClick = (props = {}) => {
export const onClickChatBubble = () => {
wootOn(bubbleHolder, 'click', onBubbleClick);
};
export const addUnreadClass = () => {
const holderEl = document.querySelector('.woot-widget-holder');
addClass(holderEl, 'has-unread-view');
};
export const removeUnreadClass = () => {
const holderEl = document.querySelector('.woot-widget-holder');
removeClass(holderEl, 'has-unread-view');
};