refactor: minor store level changes (#6500)
This commit is contained in:
parent
2f2e6626c6
commit
c0b6abc3d5
3 changed files with 12 additions and 13 deletions
|
|
@ -7,7 +7,7 @@ export const IssuesStoreContext = createContext<EIssuesStoreType | undefined>(un
|
|||
|
||||
export const useIssueStoreType = () => {
|
||||
const storeType = useContext(IssuesStoreContext);
|
||||
const { globalViewId, viewId, projectId, cycleId, moduleId, userId, epicId, teamId } = useParams();
|
||||
const { globalViewId, viewId, projectId, cycleId, moduleId, userId, epicId, teamspaceId } = useParams();
|
||||
|
||||
// If store type exists in context, use that store type
|
||||
if (storeType) return storeType;
|
||||
|
|
@ -27,9 +27,9 @@ export const useIssueStoreType = () => {
|
|||
|
||||
if (projectId) return EIssuesStoreType.PROJECT;
|
||||
|
||||
if (teamId) return EIssuesStoreType.TEAM;
|
||||
if (teamspaceId) return EIssuesStoreType.TEAM;
|
||||
|
||||
if (teamId && viewId) return EIssuesStoreType.TEAM_VIEW;
|
||||
if (teamspaceId && viewId) return EIssuesStoreType.TEAM_VIEW;
|
||||
|
||||
return EIssuesStoreType.PROJECT;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue