How much sugar a day?

today i had 50 grams of sugar. (two reese's candy bars :/ ) is that too much? i'm really confused on the whole sugar intake thing while pregnant? somebody even said their doctor said not to eat bananas cause of sugar. help please? i'm definitely trying to not eat a lot of sugar cause i know it can cause a risk of a blood sugar drop in a new born! Please educate me kindly:)