fix: Update pagination logic in the help center (#5693)
This commit is contained in:
parent
a274a1702a
commit
95cc55d043
7 changed files with 45 additions and 52 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue