UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

21 lines (18 loc) 745 B
import {createContext} from 'sanity/_createContext' import type {TasksEnabledContextValue} from '../../core/tasks/context/enabled/types' // NOTE: We initialize this context with a default value (`enabled: false`) // rather than `null` to handle cases where the tasks feature's availability // isn't explicitly provided by a surrounding provider component. Typically, // Tasks are included by default in all new Studio configurations. Therefore, // in the absence of a specific provider (TasksEnabledProvider), we assume that // the feature is disabled. /** * @internal */ export const TasksEnabledContext = createContext<TasksEnabledContextValue>( 'sanity/_singletons/context/tasks-enabled', { enabled: false, mode: null, }, )