mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-19 04:47:21 +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);
|