Skip to content

Commit

Permalink
fix: upate hash when creating new coursePage
Browse files Browse the repository at this point in the history
  • Loading branch information
elbotho committed Apr 10, 2024
1 parent 104834c commit 9211bb3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ function CourseTypeEditor(props: EditorPluginProps<CourseTypePluginState>) {
<AddButton
onClick={() => {
children.insert()
setActivePageIndex(staticPages.length)
setTimeout(() => {
setActivePageIndex(staticPages.length)
window.location.hash = `#${staticPages[staticPages.length - 1].id}`
})
}}
>
{courseStrings.addCoursePage}
Expand Down

0 comments on commit 9211bb3

Please sign in to comment.