UNPKG

899 BSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/reducers/is-correct.js"],"names":["isCorrect","config","state","action","type","answerAction","payload"],"mappings":"AAIA,eAAe,SAASA,SAAT,CAAmBC,MAAnB,EAAmE;AAChF,SAAO,CAACC,KAAe,GAAG,IAAnB,EAAyBC,MAAzB,KAAsD;AAC3D,YAAQA,MAAM,CAACC,IAAf;AACE,WAAK,QAAL;AAAe;AACb,gBAAMC,YAAY,GAAIF,MAAtB;AACA,iBAAOE,YAAY,CAACC,OAAb,CAAqBN,SAA5B;AACD;;AACD;AACE,eAAOE,KAAP;AANJ;AAQD,GATD;AAUD","sourcesContent":["// @flow\n\nimport type {Action, AnswerAction, Config} from '../types';\n\nexport default function isCorrect(config: Config): (?boolean, Action) => ?boolean {\n return (state: ?boolean = true, action: Action): ?boolean => {\n switch (action.type) {\n case 'answer': {\n const answerAction = (action: AnswerAction);\n return answerAction.payload.isCorrect;\n }\n default:\n return state;\n }\n };\n}\n"],"file":"is-correct.js"}
\No newline at end of file