fix: Update pagination logic in the help center (#5693)

This commit is contained in:
Pranav Raj S 2022-10-20 20:05:17 -07:00 committed by GitHub
parent a274a1702a
commit 95cc55d043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 52 deletions

View file

@ -4,6 +4,17 @@ import { IFrameHelper } from 'widget/helpers/utils';
import { showBadgeOnFavicon } from './faviconHelper';
export const initOnEvents = ['click', 'touchstart', 'keypress', 'keydown'];
export const getAudioContext = () => {
let audioCtx;
try {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
} catch {
// AudioContext is not available.
}
return audioCtx;
};
export const getAlertAudio = async (baseUrl = '', type = 'dashboard') => {
const audioCtx = getAudioContext();
@ -35,18 +46,6 @@ export const getAlertAudio = async (baseUrl = '', type = 'dashboard') => {
}
};
export const getAudioContext = () => {
let audioCtx;
try {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
} catch {
// AudioContext is not available.
}
return audioCtx;
};
export const notificationEnabled = (enableAudioAlerts, id, userId) => {
if (enableAudioAlerts === 'mine') {
return userId === id;