Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
if(!isIOS) {
MaterialIcons.getImageSource('qrcode-scan', 26, '#FFFFFF').then(icon => {
this.props.navigator.setButtons(
{
fab: {
collapsedId: 'scan',
collapsedIcon: icon,
collapsedIconColor: colors.white,
backgroundColor: colors.brand
},
}
)
})
}
}
componentDidMount() {
if (!isIOS) {
MaterialIcons.getImageSource('qrcode-scan', 26, '#FFFFFF').then(icon => {
this.props.navigator.setButtons({
fab: {
collapsedId: 'scan',
collapsedIcon: icon,
collapsedIconColor: colors.white,
backgroundColor: colors.brand,
},
})
})
}
}
componentDidMount() {
if (Device.isAndroid) {
MaterialIcons.getImageSource('qrcode-scan', 26, '#FFFFFF').then(icon => {
this.props.navigator.setButtons({
fab: {
collapsedId: 'scan',
collapsedIcon: icon,
collapsedIconColor: Theme.colors.primary.background,
backgroundColor: Theme.colors.primary.brand,
},
})
})
}
}
taxiTypes.forEach(type => {
Icon.getImageSource(type.icon, 25, "orangered").then(image =>
this.setState({ ...this.state, [type.type]: image })
)
})
}