Add displayName to contexts (#8814)

This commit is contained in:
Samuel Newman
2025-08-14 01:12:31 +03:00
committed by GitHub
parent 275fece3e3
commit b2c56cbd6d
89 changed files with 173 additions and 28 deletions
+3
View File
@@ -7,10 +7,13 @@ import {
} from '#/components/ContextMenu/types'
export const Context = React.createContext<ContextType | null>(null)
Context.displayName = 'ContextMenuContext'
export const MenuContext = React.createContext<MenuContextType | null>(null)
MenuContext.displayName = 'ContextMenuMenuContext'
export const ItemContext = React.createContext<ItemContextType | null>(null)
ItemContext.displayName = 'ContextMenuItemContext'
export function useContextMenuContext() {
const context = React.useContext(Context)