If I was you I would stay at the job until you get maternity leave and statutory mat pay as maternity allowance is fully deducted from universal credit but statutory maternity pay is treated like earnings. Also if you voluntarily leave a job I know they may say you're not eligible for universal credit straight away. Don't make any rushed decisions just yet.
@Cat sorry, just to jump in - she won’t have any work commitments as she already has a child under 3 years old so she will be eligible for UC straightaway if she leaves her job. She may have to attend work search interviews until her baby is born then they stop until the baby turns 1.
Maternity allowance is deducted from your UC £ for £ so deducted in full x