bloom-housing / bloom

Bloom is Exygy’s affordable housing platform. Bloom's goal is to be a single entry point for affordable housing seekers and a hub for application and listing management for developers.
https://bloomhousing.com
Apache License 2.0
32 stars 26 forks source link

Toast Infinite Re-Render #4181

Open ColinBuyck opened 4 months ago

ColinBuyck commented 4 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 3 months 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 3 months ago

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

sarahlazarich commented 2 months 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

sarahlazarich commented 1 month ago

looks good