Add displayName to contexts (#8814)
This commit is contained in:
@@ -27,6 +27,7 @@ type ControlsContext = {
|
||||
}
|
||||
|
||||
const ControlsContext = createContext<ControlsContext | null>(null)
|
||||
ControlsContext.displayName = 'GlobalDialogControlsContext'
|
||||
|
||||
export function useGlobalDialogsControlContext() {
|
||||
const ctx = useContext(ControlsContext)
|
||||
|
||||
@@ -47,6 +47,7 @@ const Context = React.createContext<Context>({
|
||||
activeNux: undefined,
|
||||
dismissActiveNux: () => {},
|
||||
})
|
||||
Context.displayName = 'NuxDialogContext'
|
||||
|
||||
export function useNuxDialogContext() {
|
||||
return React.useContext(Context)
|
||||
|
||||
Reference in New Issue
Block a user