chore: remove active ids from the MobX stores if not present in the route (#2681)
* chore: remove active ids if not present in the route * refactor: set active id logic
This commit is contained in:
parent
df8bdfd5b9
commit
83e0c4ebbd
7 changed files with 21 additions and 20 deletions
|
|
@ -44,7 +44,7 @@ export interface IProjectStore {
|
|||
currentProjectDetails: IProject | undefined;
|
||||
|
||||
// actions
|
||||
setProjectId: (projectId: string) => void;
|
||||
setProjectId: (projectId: string | null) => void;
|
||||
setSearchQuery: (query: string) => void;
|
||||
|
||||
getProjectById: (workspaceSlug: string, projectId: string) => IProject | null;
|
||||
|
|
@ -251,8 +251,8 @@ export class ProjectStore implements IProjectStore {
|
|||
}
|
||||
|
||||
// actions
|
||||
setProjectId = (projectId: string) => {
|
||||
this.projectId = projectId ?? null;
|
||||
setProjectId = (projectId: string | null) => {
|
||||
this.projectId = projectId;
|
||||
};
|
||||
|
||||
setSearchQuery = (query: string) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue