forked from abdulrawoofali/cardsGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 25.6 KB
/
.eslintcache
1
[{"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\index.js":"1","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\App.js":"2","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\reportWebVitals.js":"3","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\login.jsx":"4","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\game.jsx":"5","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\pageNotFound\\pageNotFound.jsx":"6","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\rootRedux\\store.js":"7","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\rootRedux\\rootReducer.js":"8","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\reducer.js":"9","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\actionType.js":"10","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\actionCreator.js":"11","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\AppContants.js":"12","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\reducer.js":"13","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\actionType.js":"14","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoard.jsx":"15","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameHelpers.js":"16","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\actionCreator.js":"17","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardConstants.js":"18","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardHolder\\cardHolder.jsx":"19","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\cardLoader.jsx":"20","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\card.jsx":"21","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\Loading\\Loading.jsx":"22","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\reducer.js":"23","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\actionType.js":"24","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\actionCreator.js":"25","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\Home\\home.jsx":"26"},{"size":728,"mtime":1607361323173,"results":"27","hashOfConfig":"28"},{"size":503,"mtime":1607391453203,"results":"29","hashOfConfig":"28"},{"size":362,"mtime":499162500000,"results":"30","hashOfConfig":"28"},{"size":998,"mtime":1607393829265,"results":"31","hashOfConfig":"28"},{"size":537,"mtime":1607340353845,"results":"32","hashOfConfig":"28"},{"size":99,"mtime":1607326068917,"results":"33","hashOfConfig":"28"},{"size":130,"mtime":1607328930332,"results":"34","hashOfConfig":"28"},{"size":391,"mtime":1607379259267,"results":"35","hashOfConfig":"28"},{"size":341,"mtime":1607328676653,"results":"36","hashOfConfig":"28"},{"size":31,"mtime":1607328686479,"results":"37","hashOfConfig":"28"},{"size":160,"mtime":1607328697302,"results":"38","hashOfConfig":"28"},{"size":42,"mtime":1607337730921,"results":"39","hashOfConfig":"28"},{"size":571,"mtime":1607393055516,"results":"40","hashOfConfig":"28"},{"size":75,"mtime":1607339839267,"results":"41","hashOfConfig":"28"},{"size":4946,"mtime":1607440932717,"results":"42","hashOfConfig":"28"},{"size":1477,"mtime":1607435334923,"results":"43","hashOfConfig":"28"},{"size":248,"mtime":1607393132551,"results":"44","hashOfConfig":"28"},{"size":354,"mtime":1607350373193,"results":"45","hashOfConfig":"28"},{"size":542,"mtime":1607429802925,"results":"46","hashOfConfig":"28"},{"size":459,"mtime":1607377272824,"results":"47","hashOfConfig":"28"},{"size":4853,"mtime":1607439259392,"results":"48","hashOfConfig":"28"},{"size":85,"mtime":1607347181671,"results":"49","hashOfConfig":"28"},{"size":394,"mtime":1607387974786,"results":"50","hashOfConfig":"28"},{"size":44,"mtime":1607378959871,"results":"51","hashOfConfig":"28"},{"size":169,"mtime":1607385092765,"results":"52","hashOfConfig":"28"},{"size":292,"mtime":1607391415505,"results":"53","hashOfConfig":"28"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},"m9vk9w",{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"71","messages":"72","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"73","usedDeprecatedRules":"56"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"80","messages":"81","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"82","usedDeprecatedRules":"56"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"85","messages":"86","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":1,"source":"87"},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"90","messages":"91","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"92","messages":"93","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"96","messages":"97","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"98","messages":"99","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"100","usedDeprecatedRules":"56"},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"103","messages":"104","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"105","usedDeprecatedRules":"56"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"56"},"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\index.js",[],["112","113"],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\App.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\reportWebVitals.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\login.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\game.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\pageNotFound\\pageNotFound.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\rootRedux\\store.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\rootRedux\\rootReducer.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\reducer.js",["114"],"import { LOG_IN } from \"./actionType\";\r\n\r\nconst INIT_STATE = {\r\n isLogined: false,\r\n userName : \"\"\r\n};\r\n\r\nexport default (state = INIT_STATE, action) => {\r\n switch (action.type) {\r\n case LOG_IN: {\r\n return {\r\n isLogined:true,\r\n userName : action.payload\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\actionType.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\login\\reduxLogin\\actionCreator.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\AppContants.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\reducer.js",["115"],"import {LOAD_DATA_FROM_LOCAL_STORAGE} from \"./actionType\"\r\n\r\nconst INIT_STATE = {\r\n gameOver:false,\r\n cardsData : []\r\n };\r\n\r\n export default (state = INIT_STATE, action) => {\r\n // console.log(\"calling reducer...... of gameBoard..\",\" your action is => \",action.type);\r\n switch (action.type) {\r\n case LOAD_DATA_FROM_LOCAL_STORAGE: {\r\n // console.log(action.payload, \"recived from action... in swithch\")\r\n return {\r\n ...state,\r\n cardsData : action.payload\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n}","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\actionType.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoard.jsx",["116","117"],"import { useEffect } from \"react\";\r\nimport {useHistory} from \"react-router-dom\"\r\nimport { MY_SITE_NAME } from \"../../../components/AppContants\";\r\nimport {Card as ClassCard,ObjectToString, StringToObject } from \"./gameHelpers\";\r\n\r\nimport { cardsDataActionCreator } from \"../gameBoard/gameBoardRedux/actionCreator\";\r\nimport { cardTypeObj } from \"../cardLoader/card/cardConstants\";\r\nimport { connect } from \"react-redux\";\r\nimport CardHolder from \"../cardHolder/cardHolder\";\r\nimport CardLoader from \"../cardLoader/cardLoader\";\r\nimport Loading from \"../../Loading/Loading\";\r\nimport \"./GameBoard.css\"\r\n\r\nconst SmallDisplayBoard = (props) => {\r\n const {name,value} = props;\r\n //console.log(name,value);\r\nreturn <><span className=\"btn\">{`${name} : ${value}`}</span></>;\r\n};\r\n\r\nlet spades_Cards = [];\r\nlet hearts_cards = [];\r\nlet diamonds_Cards = [];\r\nlet clubs_cards = [];\r\nlet scattered_cards = [];\r\nconst GameBoard = (props) => {\r\n const { cards, userName } = props;\r\n const history = useHistory();\r\n //console.log(cards, \"from component...\");\r\n\r\n // setting props to local storage\r\n useEffect(() => {\r\n //console.log(\"calling side effects.....\");\r\n const preservedCardData = localStorage.getItem(\r\n MY_SITE_NAME + \"DATA_OF\" + userName\r\n );\r\n\r\n console.log(preservedCardData, \"preserved data.....\");\r\n if (!preservedCardData || StringToObject(preservedCardData).length <= 0) {\r\n console.log(\"cerating new data....\");\r\n const data = ClassCard.cardDataCreator();\r\n props.cardsDataActionCreator(data);\r\n } else {\r\n console.log(\"using data from local storage..\")\r\n console.log(StringToObject(preservedCardData),preservedCardData);\r\n props.cardsDataActionCreator(StringToObject(preservedCardData));\r\n }\r\n\r\n return () => {\r\n //console.log(\"calling un mount......\");\r\n\r\n //localStorage.setItem(MY_SITE_NAME + \"DATA_OF\" + userName,ObjectToString([...cards]))\r\n \r\n };\r\n }, []);\r\n\r\n const handleLogOut = (event)=>{\r\n //console.log(props);\r\n localStorage.setItem(MY_SITE_NAME + \"DATA_OF\" + userName,ObjectToString([...cards]))\r\n event.preventDefault();\r\n history.push(\"/\");\r\n console.log(\"bye bye...\")\r\n \r\n }\r\n\r\n\r\n //console.log(cards,\"from compponents.....\")\r\n scattered_cards = cards ? cards.filter((card, index) => {\r\n if (card.isPlaced) {\r\n switch (card.type) {\r\n case cardTypeObj.SPADES: {\r\n spades_Cards.push(card);\r\n break;\r\n }\r\n case cardTypeObj.DIAMONDS: {\r\n diamonds_Cards.push(card);\r\n break;\r\n }\r\n case cardTypeObj.CLUBS: {\r\n clubs_cards.push(card);\r\n break;\r\n }\r\n case cardTypeObj.HEARTS: {\r\n hearts_cards.push(cards);\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n return false;\r\n } else {\r\n console.log(\"nxnciak\");\r\n return true};\r\n })\r\n : null;\r\n\r\n console.log(scattered_cards,\"scattered cards...\");\r\n\r\n\r\n\r\n return (<>{ cards.length > 0 ? \r\n\r\n <>\r\n \r\n <div className=\"gameBoard-main-header\">\r\n <SmallDisplayBoard name={\"score\"} value={52-scattered_cards.length} /> <SmallDisplayBoard name={\"Timmer\"} value={0} />\r\n <button onClick = {handleLogOut}>LogOut</button>\r\n </div>\r\n <div className=\"cards-scattered\">\r\n {<CardLoader view=\"card\" cards={scattered_cards} />}\r\n </div>\r\n\r\n <div className=\"cards-holders\">\r\n\r\n {\r\n <CardHolder\r\n holderType={cardTypeObj.SPADES.name}\r\n topCard={\r\n spades_Cards.length > 0\r\n ?spades_Cards [spades_Cards.length - 1]\r\n : null\r\n }\r\n />\r\n }\r\n {\r\n <CardHolder\r\n holderType={cardTypeObj.CLUBS.name}\r\n topCard={\r\n clubs_cards.length > 0\r\n ? clubs_cards[clubs_cards.length - 1]\r\n : null\r\n }\r\n />\r\n }\r\n {\r\n <CardHolder\r\n holderType={cardTypeObj.HEARTS.name}\r\n //hearts_cards\r\n topCard={\r\n hearts_cards.length > 0\r\n ? hearts_cards[hearts_cards.length - 1]\r\n : null\r\n }\r\n />\r\n }\r\n {\r\n <CardHolder\r\n holderType={cardTypeObj.DIAMONDS.name}\r\n topCard={\r\n diamonds_Cards.length > 0\r\n ? diamonds_Cards[diamonds_Cards.length - 1]\r\n : null\r\n }\r\n />\r\n }\r\n </div>\r\n </>\r\n: <Loading/>}</>\r\n );\r\n};\r\n\r\nconst mapPropsToState = (store) => {\r\n //console.log(store, \"from map...\");\r\n return {\r\n cards: store.gameBoardReducer.cardsData,\r\n isgameOver: store.gameBoardReducer.gameOver,\r\n userName: store.userReducer.userName,\r\n };\r\n};\r\n\r\nexport default connect(mapPropsToState, { cardsDataActionCreator })(GameBoard);\r\n","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameHelpers.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\gameBoard\\gameBoardRedux\\actionCreator.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardConstants.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardHolder\\cardHolder.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\cardLoader.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\card.jsx",["118","119","120","121"],"import React, { useRef, useState, useEffect } from \"react\";\r\nimport { cardTypeObj } from \"./cardConstants\";\r\nimport { cardsDataActionCreator } from \"../../gameBoard/gameBoardRedux/actionCreator\";\r\nimport { Card as ClassCard } from \"../../gameBoard/gameHelpers\";\r\nimport { connect } from \"react-redux\";\r\nimport { cardDragActionOrigin } from \"./cardRedux/actionCreator\";\r\nimport \"./Card.css\";\r\n\r\nconst Card = (props) => {\r\n const { card, view, isDrag, shape, cardsData } = props;\r\n const [position, setPosition] = useState({ x: 0, y: 0 });\r\n const pressed = card ? card.isDraging : false;\r\n\r\n const ref = useRef();\r\n useEffect(() => {\r\n if (ref.current) {\r\n ref.current.style.transform = `translate(${position.x}px, ${position.y}px)`;\r\n }\r\n return () => {};\r\n }, [position]);\r\n console.log(shape, \"Card.....\");\r\n const onMouseMove = (event) => {\r\n if (event.target.name === \"card\" && card.isDraging === false) return;\r\n event.preventDefault();\r\n\r\n if (pressed) {\r\n setPosition({\r\n x: position.x + event.movementX,\r\n y: position.y + event.movementY,\r\n });\r\n }\r\n };\r\n\r\n const onMouseUp = (event) => {\r\n const currentDropCardType = event.target.dataset.id ? event.target.dataset.id : event.target.parentNode.dataset.id \r\n console.log(currentDropCardType,\"mouse up at.....\");\r\n event.preventDefault();\r\n const copyOfData = [...cardsData];\r\n const { eventObj, eventRef,initalPos } = props;\r\n //eventRef.current.style.position = `absolute`;\r\n eventRef.current.style={offsetLeft:initalPos.x,offsetTop:initalPos.y,color:`${eventObj.color}`};\r\n \r\n\r\n //={offsetLeft:initalPos.x , offsetTop:initalPos.y,color:eventObj.color};\r\n const prevEventdataIndex = copyOfData.findIndex((ele,index)=> ele._id===eventObj._id)\r\n copyOfData[prevEventdataIndex].isDraging = false;\r\n console.log(currentDropCardType,\"is undefined...\")\r\n console.log(currentDropCardType,eventObj._id,\"hrtshr\")\r\n if(currentDropCardType==eventObj._id){\r\n console.log(\"clicked on same card.. not a valid move....\")\r\n props.cardsDataActionCreator(copyOfData);\r\n props.cardDragActionOrigin(null);\r\n return;\r\n }\r\n \r\n if(currentDropCardType===eventObj.type){\r\n console.log(\"placed on correct place holder.....\");\r\n copyOfData[prevEventdataIndex].isPlaced = true;\r\n props.cardsDataActionCreator(copyOfData);\r\n props.cardDragActionOrigin(null);\r\n return;\r\n }\r\n console.log(\"reseting....\");\r\n props.cardDragActionOrigin(null);\r\n props.cardsDataActionCreator(ClassCard.cardDataCreator());\r\n };\r\n\r\n const onMouseDown = (event) => {\r\n const currentCardId = event.target.dataset.id ? event.target.dataset.id : event.target.parentNode.dataset.id \r\n console.log(currentCardId,\"mouse down at.....\");\r\n event.preventDefault();\r\n const copyOfData = [...cardsData];\r\n const selectedCardsIndex = copyOfData.indexOf(card, 0);\r\n let eventObj = copyOfData[selectedCardsIndex];\r\n \r\n eventObj.isDraging = true;\r\n console.log(eventObj);\r\n copyOfData.splice(selectedCardsIndex,1,eventObj);\r\n console.log(\"updating ... dragable card...\");\r\n console.log(selectedCardsIndex);\r\n const initalPos ={\r\n x: event.target.style.offsetLeft,\r\n y: event.target.style.offsetTop\r\n }\r\n props.cardDragActionOrigin({ eventObj, ref,initalPos});\r\n props.cardsDataActionCreator(copyOfData);\r\n \r\n };\r\n //console.log(card);\r\n\r\n const innerShapes = card\r\n ? [...Array(card.value).keys()].map((ele) => (\r\n <>\r\n <span>{card.shape}</span>\r\n {ele % 3 === 0 ? <br /> : null}{\" \"}\r\n </>\r\n ))\r\n : null;\r\n\r\n const handleStop = (event) => {\r\n console.log(\"drag stop...\", event.target.dataset.id);\r\n };\r\n\r\n const uiOfCard = (\r\n <>\r\n <div\r\n ref={ref}\r\n className={`${view}`}\r\n style={{\r\n color: card ? card.color : \"black\",\r\n zIndex: card && card.isDraging ? 1 : null,\r\n }}\r\n data-id={card ? card._id : shape}\r\n onMouseMove={card && card.isDraging ? onMouseMove : null}\r\n onMouseDown={shape ? null : onMouseDown}\r\n onMouseUp={onMouseUp}\r\n name={card ? \"card\" : \"Shape\"}\r\n >\r\n <>\r\n <span>{card ? card.value : \"\"}</span>\r\n <span>{card ? cardTypeObj[card.type].symbol : \"\"}</span>\r\n {props.children}\r\n </>\r\n </div>\r\n </>\r\n );\r\n return <>{uiOfCard}</>;\r\n};\r\n\r\nconst mappropsToState = (store) => {\r\n return {\r\n cardsData: store.gameBoardReducer.cardsData,\r\n eventObj: store.cardReducer.eventObj,\r\n eventRef: store.cardReducer.ref,\r\n initalPos: store.cardReducer.initalPos,\r\n };\r\n};\r\n\r\nexport default connect(mappropsToState, {\r\n cardsDataActionCreator,\r\n cardDragActionOrigin,\r\n})(Card);\r\n","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\Loading\\Loading.jsx",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\reducer.js",["122"],"import {DRAG_START_AT} from \"./actionType\"\r\n\r\nconst INIT_STATE = {\r\n eventObj:\"\",\r\n ref:\"\",\r\n initalPos:\"\"\r\n}\r\n\r\nexport default (state=INIT_STATE,action)=>{\r\n switch(action.type){\r\n case DRAG_START_AT: {\r\n return {\r\n ...state,\r\n ...action.payload\r\n \r\n }\r\n }\r\n default: return state; \r\n }\r\n}","C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\actionType.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\game\\cardLoader\\card\\cardRedux\\actionCreator.js",[],"C:\\Users\\abdul\\OneDrive\\Desktop\\cinta-assignment\\deck-of-cards\\src\\components\\Home\\home.jsx",[],{"ruleId":"123","replacedBy":"124"},{"ruleId":"125","replacedBy":"126"},{"ruleId":"127","severity":1,"message":"128","line":8,"column":1,"nodeType":"129","endLine":19,"endColumn":3},{"ruleId":"127","severity":1,"message":"128","line":8,"column":3,"nodeType":"129","endLine":21,"endColumn":2},{"ruleId":"130","severity":1,"message":"131","line":54,"column":6,"nodeType":"132","endLine":54,"endColumn":8,"suggestions":"133"},{"ruleId":"134","severity":1,"message":"135","line":119,"column":16,"nodeType":"136","messageId":"137","endLine":119,"endColumn":54,"fix":"138"},{"ruleId":"139","severity":1,"message":"140","line":10,"column":23,"nodeType":"141","messageId":"142","endLine":10,"endColumn":29},{"ruleId":"143","severity":1,"message":"144","line":49,"column":27,"nodeType":"145","messageId":"146","endLine":49,"endColumn":29},{"ruleId":"139","severity":1,"message":"147","line":91,"column":9,"nodeType":"141","messageId":"142","endLine":91,"endColumn":20},{"ruleId":"139","severity":1,"message":"148","line":100,"column":9,"nodeType":"141","messageId":"142","endLine":100,"endColumn":19},{"ruleId":"127","severity":1,"message":"128","line":9,"column":1,"nodeType":"129","endLine":20,"endColumn":2},"no-native-reassign",["149"],"no-negated-in-lhs",["150"],"import/no-anonymous-default-export","Assign arrow function to a variable before exporting as module default","ExportDefaultDeclaration","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'props' and 'userName'. Either include them or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect.","ArrayExpression",["151"],"no-whitespace-before-property","Unexpected whitespace before property spades_Cards.length - 1.","MemberExpression","unexpectedWhitespace",{"range":"152","text":"153"},"no-unused-vars","'isDrag' is assigned a value but never used.","Identifier","unusedVar","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'innerShapes' is assigned a value but never used.","'handleStop' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"154","fix":"155"},[3714,3715],"","Update the dependencies array to be: [props, userName]",{"range":"156","text":"157"},[1943,1945],"[props, userName]"]