Llama-2-13B-GGML-UI / components /Promptbar /PromptBar.context.tsx
gsaivinay's picture
Duplicate from matthoffner/starchat-ui
a28cd69
raw
history blame
580 Bytes
import { Dispatch, createContext } from 'react';
import { ActionType } from '@/hooks/useCreateReducer';
import { Prompt } from '@/types/prompt';
import { PromptbarInitialState } from './Promptbar.state';
export interface PromptbarContextProps {
state: PromptbarInitialState;
dispatch: Dispatch<ActionType<PromptbarInitialState>>;
handleCreatePrompt: () => void;
handleDeletePrompt: (prompt: Prompt) => void;
handleUpdatePrompt: (prompt: Prompt) => void;
}
const PromptbarContext = createContext<PromptbarContextProps>(undefined!);
export default PromptbarContext;