I am trying to display a special instruction section only if a user has entered one. I am trying to do it with a condition statement but it just prints out ? Special Instructions : "";
I come from a php background and I am a little new to react. I am not sure what i am doing wrong. Below is my code. Any help would be really appreciated!
const OrderDetails = ({match,orders}) => {
const index = _.findIndex(orders,{id:match.params.id});
const order_deets_obj = orders[index];
const order_deets =
<div>
<div>{order_deets_obj.full_name} </div>
<div>{order_deets_obj.address} </div>
<div><button>Adjust</button> <button> Cancel </button> </div>
{order_deets_obj.special_instrusctions !== ""} ? <div>Special Instructions</div> : "";
</div>
return order_deets
}