[web] Introduce menu bar shared component GitOrigin-RevId: c304cc4e1e5961fe4ef7d2112e8d9f91c47dd0ec
11 lines
314 B
TypeScript
11 lines
314 B
TypeScript
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
|
|
}
|