From 7469e67b71e41e52fc494a705f983f96bccc4118 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:05:03 +0530 Subject: [PATCH] fix: project view application error (#6091) --- .../[projectId]/views/(list)/page.tsx | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/page.tsx b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/page.tsx index 92fedb453e6..387f6e5b423 100644 --- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/page.tsx +++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/page.tsx @@ -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 ( -
- -
- ); const handleRemoveFilter = useCallback( (key: keyof TViewFilterProps, value: string | EViewAccess | null) => { let newValues = filters.filters?.[key]; @@ -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 ( +
+ +
+ ); + return ( <>