bloom-housing / bloom

component-based web framework for affordable housing management
Apache License 2.0
34 stars 24 forks source link

Toast Infinite Re-Render #4181

Open ColinBuyck opened 2 months ago

ColinBuyck commented 2 months ago

If a user is able to navigate to a draft/closed listing application, then they will see a stack of toasts and they won't be redirected to the listings detail page. As part of https://github.com/bloom-housing/bloom/pull/4179, the addToasts call in choose-language.tsx and summary.tsx was commented out so the redirect occurs correctly but without any message.

Ideally, the toast should show once on the listing detail page you're redirected to.

Screenshot 2024-07-08 at 11 28 34 AM

sarahlazarich commented 1 month ago

Hard to say what's going on, but could be a React effect getting stuck in a loop Could be missing some kind of dependency value (3ish value)

sarahlazarich commented 1 month ago

This happens when sessions expire as well - it's the right message, but the infinite re-render

sarahlazarich commented 3 weeks ago

When there's a redirect on the toast, infinite re-renders. The case in the ticket is (temp - just commented it out) fixed, but this is still relevant when a user is signed out Going to happen in the component itself Toast use affect logic has been a headache in the past Going to require research and implementation