Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toggle: async () => {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}
},
async toggleEnabled() {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}
async toggleEnabled() {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}
async toggleEnabled() {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}
export const setUpEvents = async () => {
const isEnabled = await isEventsEnabled();
await Analitics.setEnabled(isEnabled);
};
toggle: async () => {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}
},
async toggleEnabled() {
await Analytics.setEnabled(!this.state.analyticsEnabled);
const analyticsEnabled = await Analytics.isEnabled();
this.setState({ analyticsEnabled });
}