Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...style,
marginRight: '25px'
};
}
let type = options.type;
type == 'error' && (type = 'danger');
return (
<div style="{style}">
<button data-dismiss="alert" type="button">×</button>
{message}
</div>
);
}
}
const AlerterWithAlert = withAlert(Alerter);
export class AlerterContainer extends React.Component {
render() {
return (
)
}
}
if (message.addLead) alert.success(message.addLead);
if (message.passwordNotMatch) alert.error(message.passwordNotMatch);
}
}
render() {
return ;
}
}
const mapStateToProps = state => ({
error: state.errors,
message: state.messages
});
export default connect(mapStateToProps)(withAlert(Alerts));