refactor: minor store level changes (#6500)

This commit is contained in:
Prateek Shourya 2025-01-29 01:04:54 +05:30 committed by GitHub
parent 2f2e6626c6
commit c0b6abc3d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 13 deletions

View file

@ -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;
};