chore: fix authorization for new projects in the peek overview (#3439)
* chore: fix authorization for new projects in the peek overview * fix: prjects empty state authorization * fix: peek overview auth
This commit is contained in:
parent
e36b7a5ab9
commit
0531dc3308
3 changed files with 5 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ import emptyProject from "public/empty-state/empty_project.webp";
|
|||
// icons
|
||||
import { NewEmptyState } from "components/common/new-empty-state";
|
||||
// constants
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
|
||||
export const ProjectCardList = observer(() => {
|
||||
// store hooks
|
||||
|
|
@ -18,11 +18,11 @@ export const ProjectCardList = observer(() => {
|
|||
eventTracker: { setTrackElement },
|
||||
} = useApplication();
|
||||
const {
|
||||
membership: { currentProjectRole },
|
||||
membership: { currentWorkspaceRole },
|
||||
} = useUser();
|
||||
const { workspaceProjectIds, searchedProjects, getProjectById } = useProject();
|
||||
|
||||
const isEditingAllowed = !!currentProjectRole && currentProjectRole >= EUserProjectRoles.MEMBER;
|
||||
const isEditingAllowed = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
|
||||
|
||||
if (!workspaceProjectIds)
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue