-
- {cycleStatus === "completed" &&
setTransferIssuesModal(true)} />}
-
-
-
+
+
{cycleId && }
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/issues/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/issues/index.tsx
index 80e85a74e..0e1f673ad 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/issues/index.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/issues/index.tsx
@@ -1,7 +1,3 @@
-import { useRouter } from "next/router";
-import useSWR from "swr";
-// mobx
-import { useMobxStore } from "lib/mobx/store-provider";
// components
import { ProjectLayoutRoot } from "components/issues";
import { ProjectIssuesHeader } from "components/headers";
@@ -10,27 +6,12 @@ import type { NextPage } from "next";
// layouts
import { AppLayout } from "layouts/app-layout";
-const ProjectIssues: NextPage = () => {
- const router = useRouter();
- const { workspaceSlug, projectId } = router.query;
-
- const { issueFilter: issueFilterStore } = useMobxStore();
-
- // TODO: update the fetch keys
- useSWR(
- workspaceSlug && projectId ? "REVALIDATE_USER_PROJECT_FILTERS" : null,
- workspaceSlug && projectId
- ? () => issueFilterStore.fetchUserProjectFilters(workspaceSlug.toString(), projectId.toString())
- : null
- );
-
- return (
-
} withProjectWrapper>
-
-
- );
-};
+const ProjectIssues: NextPage = () => (
+
} withProjectWrapper>
+
+
+);
export default ProjectIssues;
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/views/[viewId].tsx b/web/pages/[workspaceSlug]/projects/[projectId]/views/[viewId].tsx
index 87b230e35..e5b2d6045 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/views/[viewId].tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/views/[viewId].tsx
@@ -1,90 +1,34 @@
import { useRouter } from "next/router";
-import Link from "next/link";
-
import useSWR from "swr";
-
-// services
-import { ProjectService } from "services/project";
-import { ViewService } from "services/view.service";
+// mobx store
+import { useMobxStore } from "lib/mobx/store-provider";
// layouts
-import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
+import { AppLayout } from "layouts/app-layout";
// components
import { ProjectViewLayoutRoot } from "components/issues";
-// ui
-import { BreadcrumbItem, Breadcrumbs, CustomMenu, PhotoFilterIcon } from "@plane/ui";
-import { EmptyState } from "components/common";
-// icons
-// images
-import emptyView from "public/empty-state/view.svg";
-// helpers
-import { truncateText } from "helpers/string.helper";
-// fetch-keys
-import { PROJECT_DETAILS, VIEWS_LIST, VIEW_DETAILS } from "constants/fetch-keys";
import { ProjectViewIssuesHeader } from "components/headers";
+// ui
+import { EmptyState } from "components/common";
+// assets
+import emptyView from "public/empty-state/view.svg";
+// types
+import { NextPage } from "next";
-// services
-const projectService = new ProjectService();
-const viewService = new ViewService();
-
-const SingleView: React.FC = () => {
+const ProjectViewIssues: NextPage = () => {
const router = useRouter();
const { workspaceSlug, projectId, viewId } = router.query;
- const { data: activeProject } = useSWR(
- workspaceSlug && projectId ? PROJECT_DETAILS(projectId as string) : null,
- workspaceSlug && projectId ? () => projectService.getProject(workspaceSlug as string, projectId as string) : null
- );
+ const { projectViews: projectViewsStore } = useMobxStore();
- const { data: views } = useSWR(
- workspaceSlug && projectId ? VIEWS_LIST(projectId as string) : null,
- workspaceSlug && projectId ? () => viewService.getViews(workspaceSlug as string, projectId as string) : null
- );
-
- const { data: viewDetails, error } = useSWR(
- workspaceSlug && projectId && viewId ? VIEW_DETAILS(viewId as string) : null,
+ const { error } = useSWR(
+ workspaceSlug && projectId && viewId ? `VIEW_DETAILS_${viewId.toString()}` : null,
workspaceSlug && projectId && viewId
- ? () => viewService.getViewDetails(workspaceSlug as string, projectId as string, viewId as string)
+ ? () => projectViewsStore.fetchViewDetails(workspaceSlug.toString(), projectId.toString(), viewId.toString())
: null
);
return (
-
router.back()}>
-
-
- {`${activeProject?.name ?? "Project"} Views`}
-
-
- }
- />
-
- }
- left={
-
-
- {viewDetails?.name && truncateText(viewDetails.name, 40)}
- >
- }
- className="ml-1.5"
- width="auto"
- >
- {views?.map((view) => (
- router.push(`/${workspaceSlug}/projects/${projectId}/views/${view.id}`)}
- >
- {truncateText(view.name, 40)}
-
- ))}
-
- }
- right={}
- >
+ } withProjectWrapper>
{error ? (
{
) : (
)}
-
+
);
};
-export default SingleView;
+export default ProjectViewIssues;
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx
index aad472e75..072dcebb9 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx
@@ -2,7 +2,7 @@ import React from "react";
import type { NextPage } from "next";
import { useRouter } from "next/router";
import useSWR from "swr";
-// hooks
+// mobx store
import { useMobxStore } from "lib/mobx/store-provider";
// components
import { ProjectViewsHeader } from "components/headers";
@@ -14,14 +14,7 @@ const ProjectViews: NextPage = () => {
const router = useRouter();
const { workspaceSlug, projectId } = router.query;
- const { project: projectStore, projectViews: projectViewsStore } = useMobxStore();
-
- useSWR(
- workspaceSlug && projectId ? `PROJECT_DETAILS_${projectId.toString()}` : null,
- workspaceSlug && projectId
- ? () => projectStore.fetchProjectDetails(workspaceSlug.toString(), projectId.toString())
- : null
- );
+ const { projectViews: projectViewsStore } = useMobxStore();
useSWR(
workspaceSlug && projectId ? `PROJECT_VIEWS_LIST_${workspaceSlug.toString()}_${projectId.toString()}` : null,
@@ -30,13 +23,8 @@ const ProjectViews: NextPage = () => {
: null
);
- const projectDetails =
- workspaceSlug && projectId
- ? projectStore.getProjectById(workspaceSlug.toString(), projectId.toString())
- : undefined;
-
return (
-
}>
+
}>
);