Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async componentDidMount() {
await AppCenter.startFromLibrary(Analytics);
await this.createTargetsFromTokens(0, Analytics);
const transmissionTarget = this.transmissionTargets[this.state.targetToken.key];
if (transmissionTarget) {
const targetEnabled = await transmissionTarget.isEnabled();
this.setState({ targetEnabled });
}
}
async componentDidMount() {
await AppCenter.startFromLibrary(Analytics);
await this.createTargetsFromTokens(0, Analytics);
const transmissionTarget = this.transmissionTargets[this.state.targetToken.key];
if (transmissionTarget) {
const targetEnabled = await transmissionTarget.isEnabled();
this.setState({ targetEnabled });
}
}