mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Replace document bar with sidebar (#937)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
586969f368
commit
0627e0f551
54 changed files with 1067 additions and 604 deletions
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import equal from 'fast-deep-equal'
|
||||
import { RefObject, useEffect, useRef } from 'react'
|
||||
import { TocAst } from 'markdown-it-toc-done-right'
|
||||
import { RefObject, useEffect, useRef } from 'react'
|
||||
|
||||
export const usePostTocAstOnChange = (tocAst: RefObject<TocAst|undefined>, onTocChange?: (ast: TocAst) => void): void => {
|
||||
const lastTocAst = useRef<TocAst>()
|
||||
|
@ -15,5 +15,5 @@ export const usePostTocAstOnChange = (tocAst: RefObject<TocAst|undefined>, onToc
|
|||
lastTocAst.current = tocAst.current
|
||||
onTocChange(tocAst.current)
|
||||
}
|
||||
}, [onTocChange, tocAst])
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue