Skip to content

Commit

Permalink
fix: project view application error (#6091)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsinghbhatia authored Nov 25, 2024
1 parent 1cb16bf commit 7469e67
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ const ProjectViewsPage = observer(() => {
const project = projectId ? getProjectById(projectId.toString()) : undefined;
const pageTitle = project?.name ? `${project?.name} - Views` : undefined;

if (!workspaceSlug || !projectId) return <></>;

// No access to
if (currentProjectDetails?.issue_views_view === false)
return (
<div className="flex items-center justify-center h-full w-full">
<EmptyState
type={EmptyStateType.DISABLED_PROJECT_VIEW}
primaryButtonLink={`/${workspaceSlug}/projects/${projectId}/settings/features`}
/>
</div>
);
const handleRemoveFilter = useCallback(
(key: keyof TViewFilterProps, value: string | EViewAccess | null) => {
let newValues = filters.filters?.[key];
Expand All @@ -59,6 +47,19 @@ const ProjectViewsPage = observer(() => {

const isFiltersApplied = calculateTotalFilters(filters?.filters ?? {}) !== 0;

if (!workspaceSlug || !projectId) return <></>;

// No access to
if (currentProjectDetails?.issue_views_view === false)
return (
<div className="flex items-center justify-center h-full w-full">
<EmptyState
type={EmptyStateType.DISABLED_PROJECT_VIEW}
primaryButtonLink={`/${workspaceSlug}/projects/${projectId}/settings/features`}
/>
</div>
);

return (
<>
<PageHead title={pageTitle} />
Expand Down

0 comments on commit 7469e67

Please sign in to comment.