Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<img src="{require('../../../../../assets/LoadingAssets/LoadingBars.svg')}" alt="loading">
)
});
//add this simple check for begging -
if (name.length > 0 && email.length > 0 && message.length > 0) {
let templateParams = {
name: name,
email: email,
message: message,
dynamicColor: ''
};
emailjs
.send(
// 'default_service' and 'visual-music' are coresponse to visual-music user dash configs at emailjs.com
'default_service',
'visual_music',
templateParams,
process.env.REACT_APP_emailJS
)
.then(response => {
this.resetForm();
this.setState({
span: 'email has been sent, thank you :)',
dynamicColor: 'black'
});
})
.catch(err => {
console.log('FAILED', err);