UNPKG

@livelike/react-native

Version:

LiveLike React Native package

32 lines (29 loc) 1.2 kB
import { numberPredictionWidgetStoreActions, widgetStoreActions, emojiSliderWidgetStoreActions, textAskWidgetStoreActions, } from '../store'; export type UseWidgetActionsArg = { widgetId: string; }; export function useWidgetActions({ widgetId }: UseWidgetActionsArg) { return { updateWidgetUIPhaseAction: widgetStoreActions.updateWidgetUIPhaseAction, updateWidgetChoicesAction: widgetStoreActions.updateWidgetChoicesAction, updateWidgetOptionsAction: widgetStoreActions.updateWidgetOptionsAction, updateSelectedOptionIndexAction: widgetStoreActions.updateSelectedOptionIndexAction, updateWidgetResultStateAction: widgetStoreActions.updateWidgetResultStateAction, updateWidgetStateAction: widgetStoreActions.updateWidgetStateAction, updateWidgetAverageMagnitude: widgetStoreActions.updateWidgetAverageMagnitude, updateNumberPredictionOptionAction: numberPredictionWidgetStoreActions.updateNumberPredictionOptionAction, updateEmojiSliderMagnitudeAction: emojiSliderWidgetStoreActions.updateEmojiSliderMagnitudeAction, updateTextAskInputTextAction: textAskWidgetStoreActions.updateTextAskInputTextAction, }; }