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:
Aaryan Khandelwal 2023-11-08 17:35:45 +05:30 committed by GitHub
parent df8bdfd5b9
commit 83e0c4ebbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 20 deletions

View file

@ -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) => {