26w&4d Pregnant

Did anyone have a UTI  during pregnancy and got prescribed nitrofurantoin pills? Im currently 26weeks and I'm scared the antibiotics will hurt my little one although my ob did prescribe them to me.. Any suggestions would help! Thank you.