2018-01-18 22:11:51 +03:00
import React from 'react' ;
function HelperMessages ( props ) {
let message = ''
switch ( props . interaction ) {
case 'connected' :
2018-01-22 22:05:22 +03:00
message = < p > { "Nice! You're connected. Enter an input value below to get started." } < / p >
break ;
case 'locked' :
message = < p > { "Your metamask is locked! Please unlock to continue." } < / p >
2018-01-18 22:11:51 +03:00
break ;
case 'input' :
2018-01-22 22:05:22 +03:00
message = < p > { "You're swapping " + props . inputToken . value + " for " + props . outputToken . value + ". Want to know more about how the prices are determined?" } < / p >
2018-01-18 22:11:51 +03:00
// message = "Oops, looks like this address doesn't have a enough " + props.inputToken.value + " to make this trade. Add more funds to make this swap."
break ;
2018-01-20 10:02:49 +03:00
case 'error1' :
2018-01-22 22:05:22 +03:00
message = < p > { "You can't swap a token for itself! 😂" } < / p >
2018-01-20 10:02:49 +03:00
// message = "Oops, looks like this address doesn't have a enough " + props.inputToken.value + " to make this trade. Add more funds to make this swap."
break ;
2018-01-18 22:11:51 +03:00
default :
2018-01-22 22:05:22 +03:00
message = < p > { "Hi there! This site helps you swap ERC20 tokens. Looks like you aren't connected. Need help?" } < / p >
2018-01-18 22:11:51 +03:00
}
return (
< section className = "info border pa2" >
2018-01-22 22:05:22 +03:00
{ message }
2018-01-18 22:11:51 +03:00
< p > ↓ < / p >
< / s e c t i o n >
)
}
export default HelperMessages ;