From 6dfc652fbf458c3933c6eb56e21cb7a04561a25f Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 18 Jan 2024 21:37:24 +0800 Subject: [PATCH] fix: visibility not updated, close #1299 --- .../[locale]/dashboard/[subdomain]/editor/post-editor.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/[locale]/dashboard/[subdomain]/editor/post-editor.tsx b/src/app/[locale]/dashboard/[subdomain]/editor/post-editor.tsx index d84a8208..8c77e968 100644 --- a/src/app/[locale]/dashboard/[subdomain]/editor/post-editor.tsx +++ b/src/app/[locale]/dashboard/[subdomain]/editor/post-editor.tsx @@ -176,7 +176,7 @@ export default function PostEditor() { } useEditorState.setState(newValues) }, - [type, queryClient, subdomain, visibility], + [visibility, site.data?.characterId, type, queryClient], ) const isMobileLayout = useIsMobileLayout() @@ -236,8 +236,9 @@ export default function PostEditor() { if (createPage.data?.noteId) { router.replace( - `/dashboard/${subdomain}/editor?id=${createPage.data - ?.noteId}&type=${searchParams?.get("type")}`, + `/dashboard/${subdomain}/editor?id=${ + createPage.data?.noteId + }&type=${searchParams?.get("type")}`, ) }