Untitled

mail@pastecode.io avatar
unknown
plain_text
11 days ago
562 B
2
Indexable
Never
import { SET_CATEGORIES, SET_QUESTIONS, SETUP_QUIZ, ANSWER_QUESTION, RESET_QUIZ } from '../actionTypes';

export const setCategories = (categories) => ({
  type: SET_CATEGORIES,
  payload: categories
});

export const setQuestions = (questions) => ({
  type: SET_QUESTIONS,
  payload: questions
});

export const setupQuiz = (setup) => ({
  type: SETUP_QUIZ,
  payload: setup
});

export const answerQuestion = (isCorrect) => ({
  type: ANSWER_QUESTION,
  payload: isCorrect
});

export const resetQuiz = () => ({
  type: RESET_QUIZ
});
Leave a Comment