Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
super();
addons.loadAddons({});
this.panels = addons.getElements('panel');
this.state = {
addonSelected: Object.keys(this.panels)[0] || null,
};
}
getElements(type) {
return addons.getElements(type);
}
import AddonWrapper from './wrapper';
import { Label } from '../../Shared/text';
const NoAddonContainer = styled.View({
flex: 1,
alignItems: 'center',
justifyContent: 'center',
});
const Container = styled.View(({ theme }) => ({
flex: 1,
backgroundColor: theme.backgroundColor,
}));
export default class Addons extends PureComponent<{}, { addonSelected: string }> {
panels = addons.getElements('panel');
constructor(props: {}) {
super(props);
this.state = {
addonSelected: Object.keys(this.panels)[0] || null,
};
}
onPressAddon = (addonSelected: string) => {
this.setState({ addonSelected });
};
render() {
const { addonSelected } = this.state;
getElements(type) {
return addons.getElements(type);
}