Just a few quick thoughts...
If you're only "at risk" how do they *know* your role is gone - should they be going through a bit more consultation before making a decision? Are there any alternative roles? I assume they know you are pregnant and are therefore protected from discrimination?!
Is there anything in seeking to agree that you'll stay until you start maternity leave (bearing in mind that could be from about 29 weeks' pregnant)? That would help you retain your income, then e.g. look to be paid in lieu of notice plus redundancy pay, and hopefully still get Statutory Maternity Pay (you may still be entitled to SMP depending on your dates anyway), rather than just Maternity Allowance.
Good luck! Do get in touch if you'd like to talk through further - email@example.com