-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 13.2 KB
/
.eslintcache
1
[{"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\index.js":"1","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\App.js":"2","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\reportWebVitals.js":"3","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Time.js":"4","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Timer.js":"5","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\videoPlayer.js":"6","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\finishedSound.js":"7","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\asmr.js":"8","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\video.js":"9","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Cloud.js":"10"},{"size":500,"mtime":1618646135526,"results":"11","hashOfConfig":"12"},{"size":440,"mtime":1618647831053,"results":"13","hashOfConfig":"12"},{"size":375,"mtime":1618645182451,"results":"14","hashOfConfig":"12"},{"size":614,"mtime":1618645182168,"results":"15","hashOfConfig":"12"},{"size":3640,"mtime":1618652220233,"results":"16","hashOfConfig":"12"},{"size":746,"mtime":1618645182492,"results":"17","hashOfConfig":"12"},{"size":152,"mtime":1618645182186,"results":"18","hashOfConfig":"12"},{"size":1192,"mtime":1618645182169,"results":"19","hashOfConfig":"12"},{"size":376,"mtime":1618645182492,"results":"20","hashOfConfig":"12"},{"size":1845,"mtime":1618645182168,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},"13xktt7",{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"24"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"24"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43","usedDeprecatedRules":"24"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"46"},"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\index.js",[],["47","48"],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\App.js",[],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\reportWebVitals.js",[],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Time.js",[],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Timer.js",["49","50","51"],"import { useState, useEffect } from 'react'\r\nimport './index.css';\r\nimport playSound from './finishedSound';\r\nimport { Helmet } from 'react-helmet'\r\n\r\nvar Clock = () => {\r\n\r\n const [seconds, setSeconds] = useState(1500);\r\n const [isActive, setIsActive] = useState(false);\r\n const [pomodoro, setPomodoro] = useState({ isActive: true, count: 0 })\r\n\r\n\r\n function toggle() {\r\n setIsActive(!isActive);\r\n }\r\n\r\n\r\n function reset() {\r\n setSeconds(0);\r\n setIsActive(false);\r\n }\r\n\r\n function setTime(time) {\r\n setSeconds(time)\r\n }\r\n\r\n var minutes = Math.floor(seconds / 60);\r\n var displaySeconds = seconds - minutes * 60;\r\n //a little math to calculate minutes and seconds from the timer (which is in seconds)\r\n\r\n function str_pad_left(string, pad, length) {\r\n return (new Array(length + 1).join(pad) + string).slice(-length);\r\n }\r\n var finalTime = str_pad_left(minutes, '0', 2) + ':' + str_pad_left(displaySeconds, '0', 2);\r\n //formatting so the time will display as 00:00 \r\n\r\n // notification function \r\n const notify = () => {\r\n new Notification(\"Time's up!\", {\r\n body: \"It's time to take a break\",\r\n icon: 'https://i.pinimg.com/736x/8f/b3/84/8fb384e3fb66cc2ac4e420c61ada6d1c.jpg',\r\n })\r\n };\r\n\r\n\r\n useEffect(() => {\r\n let interval = null;\r\n if (isActive) {\r\n interval = setInterval(() => {\r\n if (seconds > 0) {\r\n setSeconds(seconds => seconds - 1);\r\n } else {\r\n // this will occur when the seconds have run out and clears the interval to stop the useEffect\r\n playSound()\r\n notify()\r\n if (pomodoro.isActive == true) {\r\n setPomodoro({ isActive: false, count: pomodoro.count + 1 })\r\n }\r\n clearInterval(interval)\r\n }\r\n }, 1000);\r\n } else if (!isActive && seconds !== 0) {\r\n clearInterval(interval);\r\n }\r\n return () => clearInterval(interval);\r\n }, [isActive, seconds]);\r\n\r\n\r\n return (\r\n\r\n <div className='timerContainer'>\r\n <Helmet>\r\n <title> {finalTime}</title>\r\n </Helmet>\r\n <p className='timerStyle'>{finalTime}</p>\r\n {pomodoro.count % 4 == 0 && pomodoro.count !== 0 &&\r\n <h1 style={{ color: 'white', backgroundColor: 'black', width: '300px', marginLeft: 'auto', marginRight: 'auto' }}>Time for a break!</h1>\r\n }\r\n <h1 className=\"pomoStyle\"><span style={{ color: 'darkred' }}>Pomodoro Count</span> {pomodoro.count}</h1>\r\n\r\n\r\n\r\n <div className='buttonContainer'>\r\n <button className='buttons' onClick={() => {\r\n toggle()\r\n }}>{isActive ? 'Pause' : 'Start'}</button>\r\n\r\n <button className='buttons' onClick={() => {\r\n reset()\r\n }}>Reset</button>\r\n\r\n <div className='container'>\r\n <button tabindex='0' className='buttons' onClick={() => {\r\n setTime(1500)\r\n setPomodoro({ isActive: true, count: pomodoro.count })\r\n }}>Pomodoro</button>\r\n <button className='buttons' onClick={() => setTime(300)}>Short Break</button>\r\n <button className='buttons' onClick={() => setTime(900)}>Long Break</button>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n )\r\n}\r\n\r\n\r\nexport default Clock;","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\videoPlayer.js",[],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\finishedSound.js",[],"C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\asmr.js",["52","53","54"],"import React, { useState } from 'react'\r\nimport Cloud from './Cloud'\r\nimport rainSound from './rain.wav'\r\n\r\nvar Asmr = () => {\r\n const [rain, setRain] = useState(false)\r\n const [volume, setVolume] = useState(0.1)\r\n\r\n\r\n if (rain == true) {\r\n var audio = document.getElementById(\"downPour\");\r\n audio.loop = true;\r\n var vol = volume / 10\r\n audio.volume = vol;\r\n audio.play()\r\n } else {\r\n var audio = document.getElementById(\"downPour\");\r\n if (audio != null) {\r\n audio.pause()\r\n }\r\n }\r\n\r\n const changeVolume = (event) => {\r\n setVolume(event.target.value)\r\n var vol = event.target.value\r\n vol = vol / 10\r\n if (rain == true) {\r\n console.log(vol)\r\n audio.volume = vol\r\n }\r\n }\r\n\r\n\r\n\r\n return (\r\n <>\r\n <audio id=\"downPour\">\r\n <source src={rainSound} type=\"audio/ogg\" />\r\n </audio>\r\n <input type=\"range\" min=\"0\" max=\"10\" value={volume} id=\"myNumber\" onChange={(event) => changeVolume(event)} />\r\n\r\n\r\n <Cloud rain={rain} setRain={setRain} />\r\n\r\n </>\r\n )\r\n}\r\n\r\nexport default Asmr","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\video.js",["55","56"],"import react from 'react'\r\n\r\nvar Video = () => {\r\n\r\n return(\r\n <div style={{paddingTop: '20px'}}>\r\n <iframe width=\"300\" height=\"200\" src=\"https://www.youtube.com/embed/5qap5aO4i9A\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\r\n </div>\r\n )\r\n\r\n}\r\n\r\nexport default Video","C:\\Users\\J J\\Documents\\Web Design\\Productiv\\productiv-1\\src\\Cloud.js",["57"],"var Cloud = ({ rain, setRain }) => {\r\n\r\n if (rain == true) {\r\n\r\n return (\r\n <>\r\n <svg onClick={() => {\r\n setRain(false)\r\n }\r\n\r\n } xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"25\" fill=\"currentColor\" class=\"bi bi-cloud-rain-fill notSelected\" viewBox=\"0 0 16 16\">\r\n <path d=\"M4.158 12.025a.5.5 0 0 1 .316.633l-.5 1.5a.5.5 0 1 1-.948-.316l.5-1.5a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-1 3a.5.5 0 1 1-.948-.316l1-3a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-.5 1.5a.5.5 0 1 1-.948-.316l.5-1.5a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-1 3a.5.5 0 1 1-.948-.316l1-3a.5.5 0 0 1 .632-.317zm.247-6.998a5.001 5.001 0 0 0-9.499-1.004A3.5 3.5 0 1 0 3.5 11H13a3 3 0 0 0 .405-5.973z\" />\r\n </svg>\r\n </>\r\n )\r\n } else {\r\n return (\r\n <div className={\"Rain\"}>\r\n\r\n <svg onClick={() => {\r\n setRain(true)\r\n }\r\n } xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"25\" fill=\"currentColor\" class=\"bi bi-cloud-rain selected\" viewBox=\"0 0 16 16\">\r\n <path d=\"M4.158 12.025a.5.5 0 0 1 .316.633l-.5 1.5a.5.5 0 0 1-.948-.316l.5-1.5a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-1 3a.5.5 0 0 1-.948-.316l1-3a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-.5 1.5a.5.5 0 0 1-.948-.316l.5-1.5a.5.5 0 0 1 .632-.317zm3 0a.5.5 0 0 1 .316.633l-1 3a.5.5 0 1 1-.948-.316l1-3a.5.5 0 0 1 .632-.317zm.247-6.998a5.001 5.001 0 0 0-9.499-1.004A3.5 3.5 0 1 0 3.5 11H13a3 3 0 0 0 .405-5.973zM8.5 2a4 4 0 0 1 3.976 3.555.5.5 0 0 0 .5.445H13a2 2 0 0 1 0 4H3.5a2.5 2.5 0 1 1 .605-4.926.5.5 0 0 0 .596-.329A4.002 4.002 0 0 1 8.5 2z\" />\r\n </svg>\r\n </div>\r\n )\r\n }\r\n\r\n}\r\n\r\nexport default Cloud",{"ruleId":"58","replacedBy":"59"},{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","severity":1,"message":"63","line":56,"column":43,"nodeType":"64","messageId":"65","endLine":56,"endColumn":45},{"ruleId":"66","severity":1,"message":"67","line":66,"column":8,"nodeType":"68","endLine":66,"endColumn":27,"suggestions":"69"},{"ruleId":"62","severity":1,"message":"63","line":76,"column":33,"nodeType":"64","messageId":"65","endLine":76,"endColumn":35},{"ruleId":"62","severity":1,"message":"63","line":10,"column":14,"nodeType":"64","messageId":"65","endLine":10,"endColumn":16},{"ruleId":"70","severity":1,"message":"71","line":17,"column":13,"nodeType":"72","messageId":"73","endLine":17,"endColumn":18},{"ruleId":"62","severity":1,"message":"63","line":27,"column":18,"nodeType":"64","messageId":"65","endLine":27,"endColumn":20},{"ruleId":"74","severity":1,"message":"75","line":1,"column":8,"nodeType":"72","messageId":"76","endLine":1,"endColumn":13},{"ruleId":"77","severity":1,"message":"78","line":7,"column":5,"nodeType":"79","endLine":7,"endColumn":215},{"ruleId":"62","severity":1,"message":"63","line":3,"column":14,"nodeType":"64","messageId":"65","endLine":3,"endColumn":16},"no-native-reassign",["80"],"no-negated-in-lhs",["81"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'pomodoro.count' and 'pomodoro.isActive'. Either include them or remove the dependency array. You can also replace multiple useState variables with useReducer if 'setPomodoro' needs the current value of 'pomodoro.count'.","ArrayExpression",["82"],"no-redeclare","'audio' is already defined.","Identifier","redeclared","no-unused-vars","'react' is defined but never used.","unusedVar","jsx-a11y/iframe-has-title","<iframe> elements must have a unique title property.","JSXOpeningElement","no-global-assign","no-unsafe-negation",{"desc":"83","fix":"84"},"Update the dependencies array to be: [isActive, pomodoro.count, pomodoro.isActive, seconds]",{"range":"85","text":"86"},[2140,2159],"[isActive, pomodoro.count, pomodoro.isActive, seconds]"]