Redirect not working in a switch component

Hello,
Just wondering if anyone can help me. When I put a Redirect component within a Switch component it doesn’t work, but when I take it out of the Switch component it does work. I’ve seen a couple solutions online but none seemed to work and I’m calling it a day, so I’m hoping someone might have a good idea when I come back to this.
Thank you.

Could you please share the code snippet?