From 89eaa2dfcd07e80182592601fe0751159b3ca670 Mon Sep 17 00:00:00 2001 From: Ashish Viradiya Date: Mon, 28 Oct 2024 16:25:51 +0530 Subject: [PATCH] rename/doc --- components/documents/document-header.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx index bf35ddf47..bdde92ffd 100644 --- a/components/documents/document-header.tsx +++ b/components/documents/document-header.tsx @@ -7,6 +7,7 @@ import { Document, DocumentVersion } from "@prisma/client"; import { BetweenHorizontalStartIcon, FileDownIcon, + PencilLineIcon, SheetIcon, Sparkles, TrashIcon, @@ -587,6 +588,20 @@ export default function DocumentHeader({ + { + e.stopPropagation(); + setIsEditingName(true); + setTimeout(() => { + if (nameRef.current) { + nameRef.current.focus(); + } + }, 500); + }} + > + + Rename + {primaryVersion.type !== "notion" && primaryVersion.type !== "sheet" && (!prismaDocument.assistantEnabled ? (