-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 8.95 KB
/
.eslintcache
1
[{"D:\\Coding\\CUSAT Events Radar\\website\\src\\index.js":"1","D:\\Coding\\CUSAT Events Radar\\website\\src\\App.js":"2","D:\\Coding\\CUSAT Events Radar\\website\\src\\reportWebVitals.js":"3","D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\home\\Home.js":"4","D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\about\\About.js":"5","D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\CodeOfConduct\\CodeOfConduct.js":"6","D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\CodeOfConduct\\FetchGroups.js":"7"},{"size":500,"mtime":1607522459774,"results":"8","hashOfConfig":"9"},{"size":772,"mtime":1613664315804,"results":"10","hashOfConfig":"9"},{"size":362,"mtime":1607522459774,"results":"11","hashOfConfig":"9"},{"size":6447,"mtime":1613912293648,"results":"12","hashOfConfig":"9"},{"size":319,"mtime":1610536115498,"results":"13","hashOfConfig":"14"},{"size":7480,"mtime":1613585759673,"results":"15","hashOfConfig":"9"},{"size":5713,"mtime":1613849505291,"results":"16","hashOfConfig":"9"},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"19"},"8g8a12",{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"19"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"19"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"19"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1v0aqqc",{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"19"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"32"},"D:\\Coding\\CUSAT Events Radar\\website\\src\\index.js",[],["33","34"],"D:\\Coding\\CUSAT Events Radar\\website\\src\\App.js",[],"D:\\Coding\\CUSAT Events Radar\\website\\src\\reportWebVitals.js",[],"D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\home\\Home.js",[],"D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\about\\About.js",[],"D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\CodeOfConduct\\CodeOfConduct.js",[],"D:\\Coding\\CUSAT Events Radar\\website\\src\\pages\\CodeOfConduct\\FetchGroups.js",["35"],"import React , {useEffect, useState} from 'react';\r\nimport styled from 'styled-components';\r\nimport logo from '../../logo.svg'\r\n\r\n\r\nlet CodeOfConduct = () => {\r\n let groups = [\r\n {\r\n groupName: 'Cusat Events Radar #️⃣3️⃣',\r\n groupLink: 'https://chat.whatsapp.com/EcOOIPqmyqTBgNC37zduM6'\r\n },\r\n {\r\n groupName: 'Cusat Events Radar #️⃣4️⃣',\r\n groupLink: 'https://chat.whatsapp.com/G3pVSXuxX23GkXkYbntFXu'\r\n },\r\n {\r\n groupName: 'Cusat Events Radar #️⃣5️⃣',\r\n groupLink: 'https://chat.whatsapp.com/HlODCw0YAfLBvohHnfqZnE'\r\n },\r\n ];\r\n\r\n let generateRandomIndex = (mn, mx) => { \r\n return (Math.floor(Math.random() * (mx - mn) + mn)); \r\n } \r\n\r\n let selectGroups = () =>{\r\n let localStorageRaw= localStorage.getItem('cusat-events-radar-data');\r\n let localStorageData= JSON.parse(localStorageRaw) \r\n setIsGroupAlreadyAssigned(false)\r\n if(localStorageRaw!==null && localStorageData.isAlreadyAssigned===true){\r\n setIsGroupAlreadyAssigned(true)\r\n setSelectedGroup(localStorageData)\r\n console.log(localStorageData);\r\n }else{\r\n setIsGroupAlreadyAssigned(false)\r\n let maxIndex = groups.length\r\n let randomIndex = generateRandomIndex(0,maxIndex)\r\n let dataToStore = {...groups[randomIndex], isAlreadyAssigned: true}\r\n setSelectedGroup(groups[randomIndex])\r\n localStorage.setItem('cusat-events-radar-data', JSON.stringify(dataToStore));\r\n }\r\n }\r\n\r\n let [selectedGroup,setSelectedGroup] = useState(null)\r\n let [isGroupAlreadyAssigned,setIsGroupAlreadyAssigned] = useState(false)\r\n useEffect(()=>{\r\n setTimeout(() => {\r\n selectGroups();\r\n clearTimeout(); \r\n }, 2000);\r\n },[])\r\n\r\n let joinNowButtonOnClick = () =>{\r\n window.location.href = selectedGroup.groupLink\r\n }\r\n\r\n return (<>\r\n {\r\n selectedGroup && \r\n <StyledGroupLoader>\r\n <div className=\"post-fetch\">\r\n {\r\n isGroupAlreadyAssigned &&\r\n <p><strong>Welcome Back!</strong> We already had assigned a group for you:</p>\r\n }\r\n {\r\n !isGroupAlreadyAssigned &&\r\n <p>Cool! We have assigned a group for you:</p>\r\n }\r\n <p className=\"cer-group-name\"><strong>{selectedGroup.groupName}</strong></p>\r\n <button\r\n onClick={joinNowButtonOnClick}\r\n >Join Now!</button>\r\n <p>Have fun with all the events and opportunities!</p> \r\n <p className=\"cant-join-text\">\r\n <strong>Can't Join? Facing issues? Let us know:</strong><br/>\r\n Naseem Shah: <a href=\"tel:+919544842728\">9544842728</a>,<br/>\r\n Kiran P.K: <a href=\"tel:+917559014936\">7559014936</a>,<br/>\r\n Fazil Haneefa: <a href=\"tel:+917559090892\">7559090892</a><br/>\r\n <strong><em><a href=\"mailto:[email protected]\">[email protected]</a></em></strong>\r\n </p>\r\n </div>\r\n </StyledGroupLoader>\r\n }\r\n {\r\n !selectedGroup &&\r\n <StyledGroupLoader>\r\n <div className=\"loading-group-spinner-container\">\r\n <img className=\"spinner-logo\" src={logo} alt=\"CUSAT Events Radar Logo\"/>\r\n <p>Fetching a group link for you...</p>\r\n </div>\r\n </StyledGroupLoader>\r\n }\r\n </>\r\n );\r\n}\r\n\r\n\r\nexport default CodeOfConduct;\r\n\r\n\r\nlet StyledGroupLoader = styled.div`\r\nbackground-color: white;\r\nborder: 2px solid black;\r\nborder-radius: 10px;\r\npadding: 20px;\r\ncolor: black;\r\nwidth: 80vw;\r\nheight: fit-content;\r\nmax-height: 70vh;\r\nmax-width: 500px;\r\nmin-width: 200px;\r\nposition: relative;\r\noverflow: hidden;\r\noverflow-y: auto;\r\n.cer-group-name{\r\n padding: 10px;\r\n background-color: rgba(128, 128, 128, 0.42);\r\n width: fit-content;\r\n margin: auto;\r\n border-radius: 10px;\r\n}\r\n.cant-join-text{\r\n font-size: 12px;\r\n}\r\n.loading-group-spinner-container{\r\n display: flex;\r\n justify-content: center;\r\n p{\r\n margin-left: 10px;\r\n font-weight: 500;\r\n font-size: 15px;\r\n white-space: nowrap;\r\n }\r\n}\r\n\r\n.spinner-logo{\r\n width: 50px;\r\n}\r\n.post-fetch{\r\n p{\r\n text-align: center;\r\n color: balck;\r\n }\r\n a{\r\n color: black;\r\n }\r\n button{\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 200px;\r\n box-shadow: 0px 20px 25px rgba(0, 0, 0, 0.493);\r\n padding: 15px;\r\n border: none;\r\n border-radius: 10px;\r\n background: linear-gradient(90deg, #009c4c, #004b24, #009c4c);\r\n background-position: 0%;\r\n background-size: 200%;\r\n color: white;\r\n font-weight: 900;\r\n font-family: 'Poppins', sans-serif;\r\n font-size: 18px;\r\n transition: all 0.5s ease;\r\n outline: none;\r\n margin: 40px auto;\r\n :hover{\r\n background-position: 200%;\r\n box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.493);\r\n\r\n }\r\n\r\n }\r\n}\r\n\r\n`",{"ruleId":"36","replacedBy":"37"},{"ruleId":"38","replacedBy":"39"},{"ruleId":"40","severity":1,"message":"41","line":51,"column":7,"nodeType":"42","endLine":51,"endColumn":9,"suggestions":"43"},"no-native-reassign",["44"],"no-negated-in-lhs",["45"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'selectGroups'. Either include it or remove the dependency array.","ArrayExpression",["46"],"no-global-assign","no-unsafe-negation",{"desc":"47","fix":"48"},"Update the dependencies array to be: [selectGroups]",{"range":"49","text":"50"},[1883,1885],"[selectGroups]"]