+[{"/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/in-game/ingame.js":"1","/Users/charchill/Work/Projects/catchphrase-word-game/src/index.js":"2","/Users/charchill/Work/Projects/catchphrase-word-game/src/components/router/index.js":"3","/Users/charchill/Work/Projects/catchphrase-word-game/src/components/footer/footer.js":"4","/Users/charchill/Work/Projects/catchphrase-word-game/src/serviceWorkerRegistration.js":"5","/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/main/main.js":"6","/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/pre-game/pregame.js":"7","/Users/charchill/Work/Projects/catchphrase-word-game/src/reportWebVitals.js":"8","/Users/charchill/Work/Projects/catchphrase-word-game/src/components/header/header.js":"9","/Users/charchill/Work/Projects/catchphrase-word-game/src/components/main-body-content/mbc.js":"10"},{"size":4266,"mtime":1609638870468,"results":"11","hashOfConfig":"12"},{"size":900,"mtime":1609638087375,"results":"13","hashOfConfig":"12"},{"size":588,"mtime":1609154204580,"results":"14","hashOfConfig":"12"},{"size":335,"mtime":1609602123392,"results":"15","hashOfConfig":"12"},{"size":5064,"mtime":1609006557317,"results":"16","hashOfConfig":"12"},{"size":834,"mtime":1609638815693,"results":"17","hashOfConfig":"12"},{"size":1278,"mtime":1609638847429,"results":"18","hashOfConfig":"12"},{"size":364,"mtime":1609006557316,"results":"19","hashOfConfig":"12"},{"size":295,"mtime":1609632532445,"results":"20","hashOfConfig":"12"},{"size":3084,"mtime":1609633053862,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"24","usedDeprecatedRules":"25"},"7yfzp7",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/in-game/ingame.js",["47"],"import React, { useState, useEffect } from \"react\";\nimport '../in-game/ingame.css';\nimport { Button, Container, Row, Col, Alert, Card, ButtonGroup} from 'react-bootstrap';\nimport {useLocation, Link} from 'react-router-dom';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faLowVision, faEye } from '@fortawesome/free-solid-svg-icons';\nimport Footer from \"../../components/footer/footer.js\";\nimport TimerSound from \"../../assets/audio/timer.mp3\";\nimport EndTimerSound from \"../../assets/audio/bomb.mp3\";\nimport Header from \"../../components/header/header.js\";\nimport ProgressBar from 'react-customizable-progressbar';\nimport ReactGa from 'react-ga';\n\nReactGa.initialize(\"UA-154721739-1\");\nReactGa.pageview('catchphrase.motasimfoad.com - Ingame Screen');\n\nfunction Ingame() {\n const [myObj, setMyObj] = useState([\"a\",\"b\",\"c\"]);\n const { state } = useLocation();\n const [min] = useState(state);\n const [millisec] = useState((min*60)*1000);\n const [seconds, setSeconds] = useState(0);\n const [flag, setFlag] = useState(true);\n const [rand, setRand] = useState(Math.round(Math.random() * (myObj.length-1)));\n const [temp, setTemp] = useState(rand);\n const [audio] = useState(new Audio(TimerSound));\n const [endAudio] = useState(new Audio(EndTimerSound));\n const [gameStatus, setGameStatus] = useState(false);\n \n const getData=()=>{\n fetch('https://api.motasimfoad.com/catch_phrase/catch_phrase.json'\n ).then(function(response){\n return response.json();\n })\n .then(function(myJson) {\n setMyObj(myJson);\n });\n }\n\n function toggle() {\n setFlag(!flag);\n }\n\n function word() {\n setRand(Math.round(Math.random() * (myObj.length-1)));\n setTemp ( Math.round(rand));\n }\n\n function getPercentageChange(){\n var secToMs = (seconds*1000);\n var decreaseValue = millisec - secToMs;\n var temp = (decreaseValue / millisec) * 100;\n temp = Math.round(temp);\n audio.play();\n return temp;\n }\n\n useEffect(() => {\n getData();\n const interval = setInterval(() => {\n setSeconds(seconds => seconds + 1);\n }, 1000);\n const timeout = setTimeout(() => {\n endAudio.play();\n setGameStatus(true);\n clearInterval(interval);\n }, millisec);\n return () => clearTimeout(timeout);\n }, []);\n \n return (\n <Container className=\"App\" fluid>\n <Header />\n <Row>\n <Col>\n <Alert className=\"App-Header\" variant=\"dark\">\n {flag ? <h3>{seconds}</h3>: <h4>hidden</h4>}\n <small>Timer</small>\n </Alert>\n </Col>\n <Col>\n <Alert className=\"App-Header\" variant=\"dark\">\n <Button variant=\"outline-dark\" onClick={toggle}>{flag ? <FontAwesomeIcon icon={faLowVision} />: <FontAwesomeIcon icon={faEye} />}</Button>\n <small>Visibility</small>\n </Alert>\n </Col>\n </Row>\n <Row>\n <Card>\n <Card.Body className=\"App-Game-Rules\">\n <ProgressBar\n radius={40}\n progress={getPercentageChange()}\n cut={120}\n rotate={-210}\n counterClockwise\n inverse\n initialAnimation\n initialAnimationDelay={1}\n strokeWidth={10}\n strokeColor=\"#d35400\"\n strokeLinecap=\"butt\"\n trackStrokeWidth={10}\n trackStrokeLinecap=\"butt\"\n >\n <div className=\"indicator\">\n <div>{myObj[temp]}</div>\n </div>\n </ProgressBar>\n </Card.Body>\n <Card.Footer>\n <ButtonGroup aria-label=\"Basic example\">\n <Button variant=\"warning\" className=\"btnPadding\" onClick={word} disabled={gameStatus}>Next</Button>\n <Link to=\"/pregame\"><Button variant=\"danger\" className=\"btnPadding\">Reset</Button></Link>\n </ButtonGroup> \n </Card.Footer>\n </Card>\n </Row>\n <Footer />\n </Container>\n );\n}\n\nexport default Ingame;\n",["48","49"],"/Users/charchill/Work/Projects/catchphrase-word-game/src/index.js",[],["50","51"],"/Users/charchill/Work/Projects/catchphrase-word-game/src/components/router/index.js",[],"/Users/charchill/Work/Projects/catchphrase-word-game/src/components/footer/footer.js",[],"/Users/charchill/Work/Projects/catchphrase-word-game/src/serviceWorkerRegistration.js",[],["52","53"],"/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/main/main.js",[],"/Users/charchill/Work/Projects/catchphrase-word-game/src/pages/pre-game/pregame.js",[],"/Users/charchill/Work/Projects/catchphrase-word-game/src/reportWebVitals.js",[],"/Users/charchill/Work/Projects/catchphrase-word-game/src/components/header/header.js",[],["54","55"],"/Users/charchill/Work/Projects/catchphrase-word-game/src/components/main-body-content/mbc.js",[],{"ruleId":"56","severity":1,"message":"57","line":69,"column":8,"nodeType":"58","endLine":69,"endColumn":10,"suggestions":"59"},{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","replacedBy":"63"},{"ruleId":"60","replacedBy":"64"},{"ruleId":"62","replacedBy":"65"},{"ruleId":"60","replacedBy":"66"},{"ruleId":"62","replacedBy":"67"},{"ruleId":"60","replacedBy":"68"},{"ruleId":"62","replacedBy":"69"},"react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'endAudio' and 'millisec'. Either include them or remove the dependency array.","ArrayExpression",["70"],"no-native-reassign",["71"],"no-negated-in-lhs",["72"],["71"],["72"],["71"],["72"],["71"],["72"],{"desc":"73","fix":"74"},"no-global-assign","no-unsafe-negation","Update the dependencies array to be: [endAudio, millisec]",{"range":"75","text":"76"},[2323,2325],"[endAudio, millisec]"]25],"[endAudio, millisec]"]
0 commit comments