Skip to content

Commit

Permalink
[WEB-1480] fix: preserve page access when making a copy (#4568)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 authored May 29, 2024
1 parent 6636a64 commit 8a30c2c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
// store hooks
const { createPage, getPageById } = useProjectPages(projectId?.toString() ?? "");
const page = usePage(pageId?.toString() ?? "");
const { description_html, id, name } = page;
const { access, description_html, id, name } = page;
// editor markings hook
const { markings, updateMarkings } = useEditorMarkings();
// fetch page details
Expand Down Expand Up @@ -81,6 +81,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
const formData: Partial<TPage> = {
name: "Copy of " + name,
description_html: description_html ?? "<p></p>",
access,
};

await handleCreatePage(formData)
Expand Down

0 comments on commit 8a30c2c

Please sign in to comment.