Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toggleSwitch = (value) => {
this.setState({switchValue: value})
if(value) {
this.setState({colorTheme: 'Light'});
Instabug.setColorTheme(Instabug.colorTheme.light);
} else {
this.setState({colorTheme: 'Dark'});
Instabug.setColorTheme(Instabug.colorTheme.dark);
}
}
(buttonIndex) => {
if (buttonIndex == 0) {
Instabug.setColorTheme(Instabug.colorTheme.light);
} else if (buttonIndex == 1) {
Instabug.setColorTheme(Instabug.colorTheme.dark);
}
});
}