diff --git a/packages/types/src/issues/issue.d.ts b/packages/types/src/issues/issue.d.ts
index a9d8970f90a..01c0b2f3a58 100644
--- a/packages/types/src/issues/issue.d.ts
+++ b/packages/types/src/issues/issue.d.ts
@@ -1,4 +1,4 @@
-import { EIssueServiceType } from "@plane/constants";
+import { EIssueServiceType, EIssuesStoreType } from "@plane/constants";
import { TIssuePriorities } from "../issues";
import { TIssueAttachment } from "./issue_attachment";
import { TIssueLink } from "./issue_link";
@@ -181,3 +181,10 @@ export type TPublicIssuesResponse = {
extra_stats: null;
results: TPublicIssueResponseResults;
};
+
+export interface IWorkItemPeekOverview {
+ embedIssue?: boolean;
+ embedRemoveCurrentNotification?: () => void;
+ is_draft?: boolean;
+ storeType?: EIssuesStoreType;
+}
\ No newline at end of file
diff --git a/web/app/(all)/[workspaceSlug]/(projects)/notifications/page.tsx b/web/app/(all)/[workspaceSlug]/(projects)/notifications/page.tsx
index 8afe768d80c..415ea8fbf71 100644
--- a/web/app/(all)/[workspaceSlug]/(projects)/notifications/page.tsx
+++ b/web/app/(all)/[workspaceSlug]/(projects)/notifications/page.tsx
@@ -1,22 +1,14 @@
"use client";
-import { useCallback, useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
-import useSWR from "swr";
// plane imports
-import { ENotificationLoader, ENotificationQueryParamType } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
// components
-import { LogoSpinner } from "@/components/common";
import { PageHead } from "@/components/core";
-import { SimpleEmptyState } from "@/components/empty-state";
-import { InboxContentRoot } from "@/components/inbox";
-import { IssuePeekOverview } from "@/components/issues";
+import { NotificationsRoot } from "@/components/workspace-notifications";
// hooks
-import { useIssueDetail, useUserPermissions, useWorkspace, useWorkspaceNotifications } from "@/hooks/store";
-import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";
-import { useWorkspaceIssueProperties } from "@/hooks/use-workspace-issue-properties";
+import { useWorkspace } from "@/hooks/store";
const WorkspaceDashboardPage = observer(() => {
const { workspaceSlug } = useParams();
@@ -24,98 +16,15 @@ const WorkspaceDashboardPage = observer(() => {
const { t } = useTranslation();
// hooks
const { currentWorkspace } = useWorkspace();
- const {
- currentSelectedNotificationId,
- setCurrentSelectedNotificationId,
- notificationLiteByNotificationId,
- notificationIdsByWorkspaceId,
- getNotifications,
- } = useWorkspaceNotifications();
- const { fetchUserProjectInfo } = useUserPermissions();
- const { setPeekIssue } = useIssueDetail();
// derived values
const pageTitle = currentWorkspace?.name
? t("notification.page_label", { workspace: currentWorkspace?.name })
: undefined;
- const { workspace_slug, project_id, issue_id, is_inbox_issue } =
- notificationLiteByNotificationId(currentSelectedNotificationId);
- const resolvedPath = useResolvedAssetPath({ basePath: "/empty-state/intake/issue-detail" });
-
- // fetching workspace work item properties
- useWorkspaceIssueProperties(workspaceSlug);
-
- // fetch workspace notifications
- const notificationMutation =
- currentWorkspace && notificationIdsByWorkspaceId(currentWorkspace.id)
- ? ENotificationLoader.MUTATION_LOADER
- : ENotificationLoader.INIT_LOADER;
- const notificationLoader =
- currentWorkspace && notificationIdsByWorkspaceId(currentWorkspace.id)
- ? ENotificationQueryParamType.CURRENT
- : ENotificationQueryParamType.INIT;
- useSWR(
- currentWorkspace?.slug ? `WORKSPACE_NOTIFICATION` : null,
- currentWorkspace?.slug
- ? () => getNotifications(currentWorkspace?.slug, notificationMutation, notificationLoader)
- : null
- );
-
- // fetching user project member info
- const { isLoading: projectMemberInfoLoader } = useSWR(
- workspace_slug && project_id && is_inbox_issue
- ? `PROJECT_MEMBER_PERMISSION_INFO_${workspace_slug}_${project_id}`
- : null,
- workspace_slug && project_id && is_inbox_issue ? () => fetchUserProjectInfo(workspace_slug, project_id) : null
- );
-
- const embedRemoveCurrentNotification = useCallback(
- () => setCurrentSelectedNotificationId(undefined),
- [setCurrentSelectedNotificationId]
- );
-
- // clearing up the selected notifications when unmounting the page
- useEffect(
- () => () => {
- setCurrentSelectedNotificationId(undefined);
- setPeekIssue(undefined);
- },
- [setCurrentSelectedNotificationId, setPeekIssue]
- );
return (
<>