Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const dispatchStorageEvent = (track, attrs, metrics) => {
if (track) {
Hub.dispatch('storage', { attrs, metrics }, 'Storage');
}
};
const dispatchAuthEvent = (event: string, data: any, message: string) => {
Hub.dispatch('auth', { event, data, message }, 'Auth', AMPLIFY_SYMBOL);
};
const dispatchAnalyticsEvent = (event: string, data: any, message: string) => {
Hub.dispatch(
'analytics',
{ event, data, message },
'Analytics',
AMPLIFY_SYMBOL
);
};
const dispatchAnalyticsEvent = (event, data) => {
Hub.dispatch('analytics', { event, data }, 'Analytics', AMPLIFY_SYMBOL);
};