-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 14 KB
/
.eslintcache
1
[{"C:\\wamp\\www\\ipadresstracker\\src\\App.js":"1","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\styles\\global.js":"2","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Homepage\\index.js":"3","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Homepage\\HomepageElements.js":"4","C:\\wamp\\www\\ipadresstracker\\src\\myapi.js":"5","C:\\wamp\\www\\ipadresstracker\\src\\services\\api.js":"6","C:\\wamp\\www\\ipadresstracker\\src\\index.js":"7","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Loader\\index.js":"8","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Loader\\LoaderElements.js":"9","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\MainLoader\\MainLoaderElements.js":"10","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\MainLoader\\index.js":"11"},{"size":997,"mtime":1613417584619,"results":"12","hashOfConfig":"13"},{"size":512,"mtime":1612225895111,"results":"14","hashOfConfig":"13"},{"size":6750,"mtime":1613389541122,"results":"15","hashOfConfig":"13"},{"size":5009,"mtime":1613400194074,"results":"16","hashOfConfig":"13"},{"size":58,"mtime":1612483889516,"results":"17","hashOfConfig":"13"},{"size":201,"mtime":1613389471858,"results":"18","hashOfConfig":"13"},{"size":346,"mtime":1613418851403,"results":"19","hashOfConfig":"13"},{"size":391,"mtime":1613357927911,"results":"20","hashOfConfig":"13"},{"size":1194,"mtime":1613359183926,"results":"21","hashOfConfig":"13"},{"size":1163,"mtime":1613417524375,"results":"22","hashOfConfig":"13"},{"size":734,"mtime":1613417002512,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ezosqa",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"31","usedDeprecatedRules":"32"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"45"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"50"},"C:\\wamp\\www\\ipadresstracker\\src\\App.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\styles\\global.js",[],["51","52"],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Homepage\\index.js",["53","54","55"],"import React, { useState } from 'react';\r\n\r\nimport bg from '../../Assets/pattern-bg.png';\r\nimport api from '../../services/api';\r\nimport {toast, ToastContainer} from 'react-toastify';\r\nimport 'react-toastify/dist/ReactToastify.css';\r\n\r\nimport { Arrow, BgContainer, Container} from './HomepageElements';\r\nimport Loader from '../Loader';\r\n\r\nrequire('dotenv').config();\r\n\r\n\r\nconst API_KEY=process.env.REACT_APP_GOOGLE_API_KEY;\r\nexport const IPFY_API_KEY=process.env.REACT_APP_IPFY_API_KEY;\r\nconsole.log(IPFY_API_KEY);\r\n\r\n\r\nfunction Homepage({ip, setip, vis, setvis}) {\r\nconst [ips,setips]=useState([]);\r\nconst [input,setinput]=useState();\r\nconst [location, setlocation] = useState([]);\r\nconst [isp, setisp] = useState([]);\r\nconst [isLoading, setisLoading] = useState(false);\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n const handleIpData=e=>{\r\n if(e){\r\n setisLoading(true);\r\n setip(e.target.value);\r\n console.log(ip);\r\n console.log(isLoading);\r\n if(ip===\"\"){\r\n setvis(false);\r\n }\r\n }\r\n \r\n }\r\n \r\nlet allip;\r\n async function handleSubmit(event){\r\n if(event){\r\n event.preventDefault();\r\n \r\n // const response=await api.get(`/${ip}?fields=country,countryCode,city,offset,isp,query,lat,lon,regionName,status`);\r\n \r\n //fetching data through axios(api) and stoping the loading mothion\r\n // const response=await api.get(`v1?apiKey=${IPFY_API_KEY}&domain=${ip}`).then(setisLoading(false));\r\n // const response=await api.get(`v1?apiKey=${IPFY_API_KEY}&domain=${ip}`);\r\n const response=await api.get(`v1?apiKey=${IPFY_API_KEY}&domain=${ip}`).then(function(response){\r\n // allip will receive all response data \r\n allip=response.data;\r\n //setting response data to our state->ips\r\n setips(allip);\r\n //stting location and isp to different states because of type error\r\n setlocation(allip.location);\r\n setisp(allip.isp);\r\n\r\n toast.success('✅Sucessfuly Loaded', {\r\n position: \"top-center\",\r\n autoClose: 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n });\r\n\r\n })\r\n .catch(function (error){\r\n if (error.response){\r\n toast.warn('⚠ Invalid address!', {\r\n position: \"top-center\",\r\n autoClose: 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n });\r\n } else if(error.request){\r\n toast.error('❌ Something went wrong! Try again later!', {\r\n position: \"top-center\",\r\n autoClose: 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n });\r\n }\r\n });\r\n \r\n \r\n \r\n //Set false because fecthing was finished\r\n setisLoading(false)\r\n \r\n \r\n \r\n \r\n \r\n \r\n //setting our render field of ip with current ip\r\n setinput(ip);\r\n \r\n //reseting input field\r\n setip(\"\");\r\n setvis(true);\r\n\r\n \r\n \r\n console.log(ip);\r\n // console.log(vis);\r\n // console.log(response.data);\r\n // console.log(ips.location.city);\r\n \r\n } \r\n \r\n } \r\n \r\n return (\r\n <>\r\n <BgContainer>\r\n <img src={bg} alt=\"abstract\"/>\r\n \r\n \r\n \r\n {/* Google map without icon */}\r\n <iframe\r\n width=\"1940\"\r\n height=\"650\"\r\n frameBorder=\"0\" style={{border:0}}\r\n src={`https://www.google.com/maps/embed/v1/place?key=${API_KEY}\r\n &q=${location.city}+\",\"+${location.region}+\",\"+${location.country}`} allowFullScreen> {/*¢er=${location.lat}+\",\"+${location.lng}*/}\r\n </iframe>\r\n\r\n \r\n \r\n <Container>\r\n <h1>IP Address Tracker</h1>\r\n <div className=\"divButton\">\r\n <form onSubmit={handleSubmit}>\r\n <input onChange={handleIpData} value={ip} vis={vis} placeholder=\"press enter to use your ip\"/>\r\n <button type=\"submit\" ><Arrow/></button>\r\n \r\n \r\n </form>\r\n \r\n \r\n </div>\r\n <div className=\"divData\">\r\n \r\n \r\n <span className=\"corner\">\r\n <h3>IP ADDRESS</h3>\r\n <h2>{isLoading?\"Write valid ip\":ips.ip}</h2>\r\n </span>\r\n <span>\r\n <h3>LOCATION</h3>\r\n <h2>{isLoading?\"Loading...\":(location.city+\", \"+location.country)}</h2>\r\n {/* <h2>{ips?(ips.location['city']+\",\"+ips.countryCode):\"-\"}</h2> */}\r\n </span>\r\n <span>\r\n <h3>TIMEZONE</h3>\r\n <h2>{isLoading?\"Loading..\":(\"UTC\"+\" \"+location.timezone)}</h2>\r\n {/* <h2>{ips.status===\"success\"?(\"UTC\"+\" \"+Math.round((ips.offset)/3600)+\":00\"):\"-\"}</h2> */}\r\n </span>\r\n <span >\r\n <h3>ISP</h3>\r\n <h2>{isLoading?\"Loading..\":isp}</h2>\r\n {/* <h2>{ips.status===\"success\"?ips.isp:\"-\"}</h2> */}\r\n </span>\r\n </div>\r\n {isLoading?<Loader/>:null}\r\n \r\n <ToastContainer\r\n position=\"top-center\"\r\n autoClose={5000}\r\n hideProgressBar={false}\r\n newestOnTop={false}\r\n closeOnClick\r\n rtl={false}\r\n pauseOnFocusLoss\r\n draggable\r\n pauseOnHover\r\n /> {/*Toast Container*/}\r\n </Container>\r\n\r\n </BgContainer>\r\n \r\n\r\n </>\r\n )\r\n}\r\n\r\nexport default Homepage\r\n",["56","57"],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Homepage\\HomepageElements.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\myapi.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\services\\api.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\index.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Loader\\index.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\Loader\\LoaderElements.js",["58"],"import styled from \"styled-components\";\r\nimport loader from '../../Assets/u.gif';\r\n\r\n\r\n\r\nexport const LoaderContainer=styled.section`\r\n\r\n\r\n.loaderbg{\r\n /* position:fixed; */\r\n top:0;\r\n left:0;\r\n bottom:0;\r\n right:0;\r\n background: transparent;\r\n z-index:99999;\r\n width:100%;\r\n height:100%;\r\n \r\n\r\n}\r\n\r\n.loader{\r\n \r\n position:absolute;\r\n left:0%;\r\n top:0%;\r\n\r\n border:0 solid transparent;\r\n border-radius: 50%;\r\n width:50px;\r\n height:50px;\r\n top: calc(50vh - 75px);\r\n left: calc(50vw - 75px);\r\n\r\n\r\n /* background-image: url(\"../../Assets/u.gif\");\r\n background-repeat:no-repeat;\r\n background-size:40%; */\r\n\r\n\r\n}\r\n\r\n.loader::before, #loader::after{\r\n content:'';\r\n border:1em solid #ff5733;\r\n border-radius:50%;\r\n width:inherit;\r\n height:inherit;\r\n position:absolute;\r\n top:0;\r\n left:0;\r\n animation: loader 2s linear infinite;\r\n opacity:0;\r\n\r\n}\r\n\r\n#loader::before{\r\n animation-delay: .5s;\r\n\r\n}\r\n\r\n@keyframes loader{\r\n 0%{\r\n transform:scale(0);\r\n opacity:0;\r\n }\r\n 50%{\r\n opacity:1;\r\n\r\n }\r\n 100%{\r\n transform:scale(1);\r\n opacity: 0;\r\n\r\n }\r\n}\r\n\r\n`","C:\\wamp\\www\\ipadresstracker\\src\\Pages\\MainLoader\\MainLoaderElements.js",[],"C:\\wamp\\www\\ipadresstracker\\src\\Pages\\MainLoader\\index.js",["59"],"import React from 'react'\r\nimport loaderm from '../../Assets/loader-bussola2.gif'\r\nimport { GitIcon, MainLoaderContainer } from './MainLoaderElements'\r\nimport reactDOM from 'react-dom';\r\n\r\n\r\nfunction MainLoader() {\r\n return reactDOM.createPortal(\r\n <>\r\n <MainLoaderContainer>\r\n <div id=\"table\">\r\n \r\n \r\n <img src={loaderm}/>\r\n <h1>Loading...</h1>\r\n <a href=\"https://github.com/paichato/ipadrrestracker\" target=\"#blank\">\r\n <GitIcon/>\r\n <p>Made by paichato</p>\r\n </a>\r\n </div>\r\n </MainLoaderContainer>\r\n \r\n </>, document.getElementById('loader')\r\n )\r\n}\r\n\r\nexport default MainLoader\r\n",{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","replacedBy":"63"},{"ruleId":"64","severity":1,"message":"65","line":58,"column":19,"nodeType":"66","messageId":"67","endLine":58,"endColumn":27},{"ruleId":"68","severity":1,"message":"69","line":138,"column":13,"nodeType":"70","endLine":143,"endColumn":102},{"ruleId":"71","severity":1,"message":"72","line":174,"column":54,"nodeType":"73","messageId":"74","endLine":174,"endColumn":55},{"ruleId":"60","replacedBy":"75"},{"ruleId":"62","replacedBy":"76"},{"ruleId":"64","severity":1,"message":"77","line":2,"column":8,"nodeType":"66","messageId":"67","endLine":2,"endColumn":14},{"ruleId":"78","severity":1,"message":"79","line":14,"column":13,"nodeType":"70","endLine":14,"endColumn":33},"no-native-reassign",["80"],"no-negated-in-lhs",["81"],"no-unused-vars","'response' is assigned a value but never used.","Identifier","unusedVar","jsx-a11y/iframe-has-title","<iframe> elements must have a unique title property.","JSXOpeningElement","no-useless-concat","Unexpected string concatenation of literals.","BinaryExpression","unexpectedConcat",["80"],["81"],"'loader' is defined but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","no-global-assign","no-unsafe-negation"]