import { PropsWithChildren, createContext, useContext } from 'react'; import { useEntryActions } from '../hooks/useEntryAction'; type EntryActionsContextValue = ReturnType; const EntryActionsContext = createContext(null); interface EntryActionsProviderProps extends PropsWithChildren { actions: EntryActionsContextValue; } export function EntryActionsProvider({ children, actions }: EntryActionsProviderProps) { return {children}; } export function useEntryActionsContext(): EntryActionsContextValue { const context = useContext(EntryActionsContext); if (!context) { throw new Error('useEntryActionsContext must be used within EntryActionsProvider'); } return context; }