Untitled

Anonymous
plain_text
06/03/2024 9:37 AM
752 B
26
Indexable
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
});
Editor is loading...
Leave a Comment