Skip to content

Fix bug: Free user see alert when they switch to default project in some case [INS-4464]#7992

Merged
gatzjames merged 1 commit intodevelopfrom
fix/upgrade-plan-prompt
Sep 24, 2024
Merged

Fix bug: Free user see alert when they switch to default project in some case [INS-4464]#7992
gatzjames merged 1 commit intodevelopfrom
fix/upgrade-plan-prompt

Conversation

@yaoweiprc
Copy link
Contributor

Free user can either have one project with multiple members or have multiple project with one member. So if you are a free user and only have one project. You invite someone to your project. Then you create a new project. An Alert of 'Could not create project' shows. Then you remove the other member from your project. You can successfully create a new project. But when you switch to the previous project, the alert shows again.
It's introduced by react router's data router, which persists fetch.data.

@yaoweiprc yaoweiprc changed the title Fix bug: Free user see alert when they switch to default project in some case Fix bug: Free user see alert when they switch to default project in some case [INS-4464] Sep 23, 2024
Copy link
Contributor

@gatzjames gatzjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much simpler than the useEffect approach but some things to keep in mind:

  • It will create sync issues if we do async stuff that then need to update state
  • We should upgrade this to an action with the new react router v7 version
  • We should hold back from doing the same thing on other actions since it will create a lot of tech debt

Free user can either have one project with multiple members or have multiple project with one member.
So if you are a free user and only have one project. You invite someone to your project. Then you create a new project. An Alert of 'Could not create project' shows.
Then you remove the other member from your project. You can successfully create a new project. But when you switch to the previous project, the alert shows again.
@gatzjames gatzjames force-pushed the fix/upgrade-plan-prompt branch from d946080 to e722954 Compare September 24, 2024 10:44
@gatzjames gatzjames merged commit be43da6 into develop Sep 24, 2024
@gatzjames gatzjames deleted the fix/upgrade-plan-prompt branch September 24, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants