Skip to content

Commit

Permalink
fix: visibility not updated, close #1299
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jan 18, 2024
1 parent c23c86a commit 6dfc652
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/[locale]/dashboard/[subdomain]/editor/post-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default function PostEditor() {
}
useEditorState.setState(newValues)
},
[type, queryClient, subdomain, visibility],
[visibility, site.data?.characterId, type, queryClient],
)

const isMobileLayout = useIsMobileLayout()
Expand Down Expand Up @@ -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")}`,
)
}

Expand Down

0 comments on commit 6dfc652

Please sign in to comment.