Got a UTI…

I called my doctor and she is prescribing me macrobid 2 times a day for 7 days… I’m just worried about taking antibiotics with the baby… has anyone else had to do this? Currently 25 weeks pregnant!