Laying people off to avoid paying for maternity leave is illegal but quite common. It’s difficult to prove though.
She can file a complaint. If she can prove it was over her pregnancy she can win, but the company can simply lie and say it was part of larger layoffs. Her best bet is to get someone clueless and angry to admit it was over her pregnancy.
Have her pick a fight with her boss over text message. If he admits it she sues and submits that as evidence. If he doesn’t there’s really no way to prove it.