Skip to content

Commit d3ecaeb

Browse files
committed
remove dead code
1 parent c595009 commit d3ecaeb

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/layouts/SidebarLayout.res

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -143,23 +143,6 @@ module Sidebar = {
143143
) => {
144144
let isItemActive = (navItem: NavItem.t) => navItem.href === (route :> string)
145145

146-
// the height of the navbars above is fluid across pages, and it's easy to get it wrong
147-
// so we calculate it dynamically here
148-
let sidebarTopOffset = isOpen
149-
? {
150-
let mobileNavbarHeight =
151-
Nullable.make(document->WebAPI.Document.getElementById("mobile-navbar"))
152-
->Nullable.map(el => el.clientHeight)
153-
->Nullable.getOr(0)
154-
let docNavbarHeight =
155-
Nullable.make(document->WebAPI.Document.getElementById("doc-navbar"))
156-
->Nullable.map(el => el.clientHeight)
157-
->Nullable.getOr(0)
158-
159-
mobileNavbarHeight + docNavbarHeight + 8
160-
}
161-
: 0
162-
163146
let getActiveToc = (navItem: NavItem.t) => {
164147
if navItem.href === (route :> string) {
165148
activeToc

0 commit comments

Comments
 (0)