@elastic-suite/gally-admin-components
Version:
Components package for gally admin BO
21 lines (18 loc) • 612 B
text/typescript
import {
ICatalog,
IHydraCatalog,
ILocalizedCatalog,
} from '@elastic-suite/gally-admin-shared'
import { Dispatch, SetStateAction, createContext } from 'react'
export interface ICatalogContext {
catalog?: ICatalog
catalogId: number
catalogs: IHydraCatalog[]
localizedCatalog?: ILocalizedCatalog
localizedCatalogId: number
localizedCatalogWithDefault: ILocalizedCatalog | null
localizedCatalogIdWithDefault: string
setCatalogId: Dispatch<SetStateAction<number>>
setLocalizedCatalogId: Dispatch<SetStateAction<number>>
}
export const catalogContext = createContext<ICatalogContext>(null)