Guest User

Untitled

a guest
Mar 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import {
  2. UPDATE_INFORMAITON,
  3. ADD_ANSWER
  4. } from './mutations';
  5.  
  6. // CODE...
  7.  
  8. const mutations = {
  9. [UPDATE_INFORMAITON](state, info) {
  10. state.newQuiz.title = info.title;
  11. state.newQuiz.description = info.description;
  12. },
  13.  
  14. [ADD_ANSWER](state, questionIndex) {
  15. const answers = state.newQuiz.questions[questionIndex].answers;
  16. if (answers.length < 5) {
  17. answers.push({
  18. answer: "Anotha one!",
  19. isRight: false
  20. });
  21. }
  22. }
  23. };
  24.  
  25. // CODE...
Add Comment
Please, Sign In to add comment