quadratic icon indicating copy to clipboard operation
quadratic copied to clipboard

Bug: Added Team (menu item) disappears when navigating to a different page

Open waveminded opened this issue 1 year ago • 3 comments

  1. create a new Team
  2. add credit card details / subscribe
  3. new Team is added to the sidebar
  4. click on something like your profile -> new team disappears from sidebar
  5. refresh page, new Team reappears again

waveminded avatar Feb 23 '24 21:02 waveminded

@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.

jimniels avatar Feb 24 '24 15:02 jimniels

Yeah, I think this is a relatively low priority. It's an edge case, and fixed by a refresh

davidkircos avatar Feb 24 '24 16:02 davidkircos

FWIW: once we ship sockets for updating team data, this should (hopefully) go away — as long as the stripe web hook is fast enough.

jimniels avatar Feb 27 '24 23:02 jimniels

tested in SQL branch, not relevant with sweeping workspace changes

luke-quadratic avatar Jun 20 '24 16:06 luke-quadratic