mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: set body indent after navigation properly
This commit is contained in:
parent
03e3454afc
commit
48499ed83d
1 changed files with 1 additions and 1 deletions
|
|
@ -269,7 +269,7 @@ function useUpdateBodyIndentAfterRedirect(update: (shouldExpand: boolean) => voi
|
|||
const shouldExpand = getDerivedExpansion({ intelligentToggle, sidebarToggleMode })
|
||||
update(shouldExpand)
|
||||
// Below DOM mutation cannot be omitted, if do, body indent may get lost when shouldExpand is true for both before & after redirecting
|
||||
DOMHelper.setBodyIndent(sidebarPlacement)
|
||||
DOMHelper.setBodyIndent(shouldExpand && sidebarPlacement)
|
||||
}
|
||||
}, [update, sidebarToggleMode, intelligentToggle, sidebarPlacement]),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue