quadratic
quadratic copied to clipboard
Bug: Added Team (menu item) disappears when navigating to a different page
- create a new Team
- add credit card details / subscribe
- new Team is added to the sidebar
- click on something like your profile -> new team disappears from sidebar
- refresh page, new Team reappears again
@davidkircos this is a problem with our filteredTeams
logic when we redirect back from stripe.
const teamsFiltered = teams.filter((team) => team.team.activated || team.team.uuid === params.uuid);
The problem is that we navigate back to the team and its value is activated: false
but because we're on the route, we show it. However, once you navigate away from it, its value is still activated: false
so now it disappears from the UI.
Once the user navigates once again to a team, the /teams
route revalidates and then the data comes back as activated: true
and that's why it re-appears in the UI.
We will have to re-think this approach.
Yeah, I think this is a relatively low priority. It's an edge case, and fixed by a refresh
FWIW: once we ship sockets for updating team data, this should (hopefully) go away — as long as the stripe web hook is fast enough.
tested in SQL branch, not relevant with sweeping workspace changes