Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function instrumentButtonClick(type : string) {
track({
[ FPTI.KEY.STATE ]: FPTI.STATE.LOAD,
[ FPTI.KEY.TRANSITION ]: FPTI.TRANSITION.BUTTON_CLICK,
[ FPTI.KEY.BUTTON_TYPE ]: type
});
flushLogs();
}
export function logRedirect(location : string) {
if (redirected) {
warn(`multiple_redirects`);
}
if (urlWillRedirectPage(location)) {
redirected = true;
}
flushLogs();
}
function instrumentButtonRender(type : string) {
info(`render_${ type }_button`);
track({
[ FPTI.KEY.STATE ]: FPTI.STATE.LOAD,
[ FPTI.KEY.TRANSITION ]: FPTI.TRANSITION.BUTTON_RENDER,
[ FPTI.KEY.BUTTON_TYPE ]: type
});
flushLogs();
}