Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- UPDATE_INFORMAITON,
- ADD_ANSWER
- } from './mutations';
- // CODE...
- const mutations = {
- [UPDATE_INFORMAITON](state, info) {
- state.newQuiz.title = info.title;
- state.newQuiz.description = info.description;
- },
- [ADD_ANSWER](state, questionIndex) {
- const answers = state.newQuiz.questions[questionIndex].answers;
- if (answers.length < 5) {
- answers.push({
- answer: "Anotha one!",
- isRight: false
- });
- }
- }
- };
- // CODE...
Add Comment
Please, Sign In to add comment