UNPKG

1.05 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/reducers/has-viewed-a-resource-at-this-step.js"],"names":["hasViewedAResourceAtThisStep","config","hasAlreadyViewed","action","type"],"mappings":"AAIA,eAAe,SAASA,4BAAT,CAAsCC,MAAtC,EAAoF;AACjG,SAAO,CAACC,gBAAyB,GAAG,KAA7B,EAAoCC,MAApC,KAAgE;AACrE,YAAQA,MAAM,CAACC,IAAf;AACE,WAAK,UAAL;AAAiB;AACf,iBAAO,IAAP;AACD;;AACD,WAAK,QAAL;AACA,WAAK,mBAAL;AACA,WAAK,kBAAL;AAAyB;AACvB,iBAAO,KAAP;AACD;;AACD;AACE,eAAOF,gBAAP;AAVJ;AAYD,GAbD;AAcD","sourcesContent":["// @flow\n\nimport type {Action, Config} from '../types';\n\nexport default function hasViewedAResourceAtThisStep(config: Config): (boolean, Action) => boolean {\n return (hasAlreadyViewed: boolean = false, action: Action): boolean => {\n switch (action.type) {\n case 'resource': {\n return true;\n }\n case 'answer':\n case 'extraLifeAccepted':\n case 'extraLifeRefused': {\n return false;\n }\n default:\n return hasAlreadyViewed;\n }\n };\n}\n"],"file":"has-viewed-a-resource-at-this-step.js"}
\No newline at end of file