mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #23300 from overleaf/mj-ide-menu-hover
[web] Introduce menu bar shared component GitOrigin-RevId: c304cc4e1e5961fe4ef7d2112e8d9f91c47dd0ec
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { MenuBarContext } from '@/shared/context/menu-bar-context'
|
||||
import { useContext } from 'react'
|
||||
|
||||
export const useMenuBar = () => {
|
||||
const context = useContext(MenuBarContext)
|
||||
if (context === undefined) {
|
||||
throw new Error('useMenuBarContext must be used within a MenuBarContext')
|
||||
}
|
||||
return context
|
||||
}
|
||||
Reference in New Issue
Block a user