import { action } from 'typesafe-actions' ; import { Constants , Question , Answer } from './types' ; export function setQuestion ( question ) { return action ( Constants . SET_QUESTION , { question , } ) ; } export function addAnswer ( answer ) { return action ( Constants . ADD_ANSWER , { answer , } ) ; } export function initAnswers ( ) { return action ( Constants . INIT_ANSWERS ) ; } export function setLoadingValue ( value ) { return action ( Constants . SET_LOADING_VALUE , { value , } ) ; } export function setIntroValue ( value ) { return action ( Constants . SET_INTRO_VALUE , { value , } ) ; } export function clearQuizData ( ) { return action ( Constants . CLEAR_QUIZ_DATA ) ; }