From 6e7a96394a26a4c805b1c1eb53707e14fcc26266 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 23 Nov 2023 18:22:25 +0530 Subject: [PATCH] fix: page scroll area (#2850) --- .../src/ui/components/page-renderer.tsx | 2 +- .../src/ui/components/summary-popover.tsx | 2 +- .../editor/document-editor/src/ui/index.tsx | 6 ++-- .../document-editor/src/ui/readonly/index.tsx | 6 ++-- .../projects/[projectId]/pages/[pageId].tsx | 33 ++++++++++--------- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/packages/editor/document-editor/src/ui/components/page-renderer.tsx b/packages/editor/document-editor/src/ui/components/page-renderer.tsx index 194152dd3..cff043171 100644 --- a/packages/editor/document-editor/src/ui/components/page-renderer.tsx +++ b/packages/editor/document-editor/src/ui/components/page-renderer.tsx @@ -18,7 +18,7 @@ export const PageRenderer = (props: IPageRenderer) => { } = props; return ( -
+

{documentDetails.title}

diff --git a/packages/editor/document-editor/src/ui/components/summary-popover.tsx b/packages/editor/document-editor/src/ui/components/summary-popover.tsx index 7c85ed945..46b99d048 100644 --- a/packages/editor/document-editor/src/ui/components/summary-popover.tsx +++ b/packages/editor/document-editor/src/ui/components/summary-popover.tsx @@ -44,7 +44,7 @@ export const SummaryPopover: React.FC = (props) => { {!sidePeekVisible && (
-
-
+
+
-
-
+
+
{ handleSubmit(updatePage)().finally(() => setIsSubmitting("submitted")); }, 1500); + if (error) + return ( + router.push(`/${workspaceSlug}/projects/${projectId}/pages`), + }} + /> + ); + return ( <> - {error ? ( - router.push(`/${workspaceSlug}/projects/${projectId}/pages`), - }} - /> - ) : pageDetails ? ( + {pageDetails ? (
{pageDetails.is_locked || pageDetails.archived_at ? ( @@ -267,9 +270,9 @@ const PageDetailsPage: NextPageWithLayout = () => {
) : ( - - - +
+ +
)} );