Files
kandev/apps/web/components/task/chat/editor-context.tsx
T
Carlos Florêncio f4d1dfd3a7 feat: better context files (#222)
feat: context files
2026-02-14 20:13:11 +00:00

14 lines
371 B
TypeScript

'use client';
import { createContext, useContext } from 'react';
type EditorContextValue = {
sessionId: string | null;
taskId: string | null;
};
const EditorContext = createContext<EditorContextValue>({ sessionId: null, taskId: null });
export const EditorContextProvider = EditorContext.Provider;
export const useEditorContext = () => useContext(EditorContext);