diff --git a/web/app/[workspaceSlug]/projects/[projectId]/inbox/page.tsx b/web/app/[workspaceSlug]/projects/[projectId]/inbox/page.tsx
index 596de85b22..0a2ecd17d4 100644
--- a/web/app/[workspaceSlug]/projects/[projectId]/inbox/page.tsx
+++ b/web/app/[workspaceSlug]/projects/[projectId]/inbox/page.tsx
@@ -1,8 +1,7 @@
"use client";
-
import { observer } from "mobx-react";
-import { useParams, useSearchParams } from "next/navigation";
// components
+import { useParams, useSearchParams } from "next/navigation";
import { PageHead } from "@/components/core";
import { EmptyState } from "@/components/empty-state";
import { InboxIssueRoot } from "@/components/inbox";
@@ -16,9 +15,12 @@ import { useProject } from "@/hooks/store";
const ProjectInboxPage = observer(() => {
/// router
const { workspaceSlug, projectId } = useParams();
+
const searchParams = useSearchParams();
+
const navigationTab = searchParams.get("currentTab");
const inboxIssueId = searchParams.get("inboxIssueId");
+
// hooks
const { currentProjectDetails } = useProject();
diff --git a/web/components/headers/page-details.tsx b/web/components/headers/page-details.tsx
deleted file mode 100644
index 94ecd99574..0000000000
--- a/web/components/headers/page-details.tsx
+++ /dev/null
@@ -1,169 +0,0 @@
-import { useState } from "react";
-import { observer } from "mobx-react";
-import { useRouter } from "next/router";
-import { FileText } from "lucide-react";
-// types
-import { TLogoProps } from "@plane/types";
-// ui
-import { Breadcrumbs, Button, EmojiIconPicker, EmojiIconPickerTypes, TOAST_TYPE, setToast } from "@plane/ui";
-// components
-import { BreadcrumbLink, Logo } from "@/components/common";
-// helper
-import { convertHexEmojiToDecimal } from "@/helpers/emoji.helper";
-// hooks
-import { usePage, useProject } from "@/hooks/store";
-import { usePlatformOS } from "@/hooks/use-platform-os";
-
-export interface IPagesHeaderProps {
- showButton?: boolean;
-}
-
-export const PageDetailsHeader = observer(() => {
- // router
- const router = useRouter();
- const { workspaceSlug, pageId } = router.query;
- // state
- const [isOpen, setIsOpen] = useState(false);
- // store hooks
- const { currentProjectDetails } = useProject();
- const { isContentEditable, isSubmitting, name, logo_props, updatePageLogo } = usePage(pageId?.toString() ?? "");
-
- const handlePageLogoUpdate = async (data: TLogoProps) => {
- if (data) {
- updatePageLogo(data)
- .then(() => {
- setToast({
- type: TOAST_TYPE.SUCCESS,
- title: "Success!",
- message: "Logo Updated successfully.",
- });
- })
- .catch(() => {
- setToast({
- type: TOAST_TYPE.ERROR,
- title: "Error!",
- message: "Something went wrong. Please try again.",
- });
- });
- }
- };
- // use platform
- const { platform } = usePlatformOS();
- // derived values
- const isMac = platform === "MacOS";
-
- return (
-
-
-
-
-
-
-
-
-
- )
- }
- />
-
-
-
-
-
- }
- />
-
- }
- />
- }
- />
- setIsOpen(val)}
- className="flex items-center justify-center"
- buttonClassName="flex items-center justify-center"
- label={
- <>
- {logo_props?.in_use ? (
-
- ) : (
-
- )}
- >
- }
- onChange={(val) => {
- let logoValue = {};
-
- if (val?.type === "emoji")
- logoValue = {
- value: convertHexEmojiToDecimal(val.value.unified),
- url: val.value.imageUrl,
- };
- else if (val?.type === "icon") logoValue = val.value;
-
- handlePageLogoUpdate({
- in_use: val?.type,
- [val?.type]: logoValue,
- }).finally(() => setIsOpen(false));
- }}
- defaultIconColor={
- logo_props?.in_use && logo_props.in_use === "icon" ? logo_props?.icon?.color : undefined
- }
- defaultOpen={
- logo_props?.in_use && logo_props?.in_use === "emoji"
- ? EmojiIconPickerTypes.EMOJI
- : EmojiIconPickerTypes.ICON
- }
- />
- }
- />
- }
- />
-
-
-
- {isContentEditable && (
-
- )}
-
- );
-});
diff --git a/web/components/issues/issue-layouts/properties/all-properties.tsx b/web/components/issues/issue-layouts/properties/all-properties.tsx
index d79161ea6f..ce72c7647b 100644
--- a/web/components/issues/issue-layouts/properties/all-properties.tsx
+++ b/web/components/issues/issue-layouts/properties/all-properties.tsx
@@ -44,7 +44,9 @@ export interface IIssueProperties {
export const IssueProperties: React.FC = observer((props) => {
// router
const router = useRouter();
- const { workspaceSlug, projectId } = router.query;
+ const { workspaceSlug, projectId } = useParams();
+ const pathname = usePathname();
+
const { issue, updateIssue, displayProperties, activeLayout, isReadOnly, className } = props;
// store hooks
const { getProjectById } = useProject();
@@ -60,10 +62,7 @@ export const IssueProperties: React.FC = observer((props) => {
const { getStateById } = useProjectState();
const { isMobile } = usePlatformOS();
const projectDetails = getProjectById(issue.project_id);
- // router
- const router = useRouter();
- const { workspaceSlug } = useParams();
- const pathname = usePathname();
+
const currentLayout = `${activeLayout} layout`;
// derived values
const stateDetails = getStateById(issue.state_id);
diff --git a/web/components/issues/issue-modal/form.tsx b/web/components/issues/issue-modal/form.tsx
index 0fe6f16101..9b0f1deabe 100644
--- a/web/components/issues/issue-modal/form.tsx
+++ b/web/components/issues/issue-modal/form.tsx
@@ -145,21 +145,6 @@ export const IssueFormRoot: FC = observer((props) => {
useKeypress("Escape", handleKeyDown);
- const handleKeyDown = (event: KeyboardEvent) => {
- if (editorRef.current?.isEditorReadyToDiscard()) {
- onClose();
- } else {
- setToast({
- type: TOAST_TYPE.ERROR,
- title: "Error!",
- message: "Editor is still processing changes. Please wait before proceeding.",
- });
- event.preventDefault(); // Prevent default action if editor is not ready to discard
- }
- };
-
- useKeypress("Escape", handleKeyDown);
-
const {
issue: { getIssueById },
} = useIssueDetail();