mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-22 06:24:56 +00:00
10 lines
268 B
TypeScript
10 lines
268 B
TypeScript
![]() |
import { createContext, useContext } from 'react';
|
||
|
|
||
|
export type ModalContextType = {
|
||
|
isInsideModal: boolean;
|
||
|
};
|
||
|
|
||
|
export const ModalContext = createContext<ModalContextType>({ isInsideModal: false });
|
||
|
|
||
|
export const useModalContext = () => useContext(ModalContext);
|