Spaces:
Runtime error
Runtime error
File size: 580 Bytes
13095e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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;
|