{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\user\\\\Desktop\\\\05mediaSocial\\\\client\\\\src\\\\components\\\\Post\\\\CardComments.js\",\n  _s = $RefreshSig$();\nimport React, { useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { isEmpty } from \"../Utils\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst CardComments = post => {\n  _s();\n  const {\n    Text,\n    setText\n  } = useState(\"\");\n  const usersData = useSelector(state => state.usersReducer);\n  const userData = useSelector(state => state.userReducer);\n  const dispatch = useDispatch();\n  const handleComment = () => {};\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    className: \"comments-container\",\n    children: postMessage.comments.map(comment => {\n      return /*#__PURE__*/_jsxDEV(\"div\", {\n        className: comments.commenterId === userData._id ? \"comment-container client\" : \"comments-container\",\n        children: /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"left-part\",\n          children: /*#__PURE__*/_jsxDEV(\"img\", {\n            src: !isEmpty(usersData[0]) && usersData.map(user => {\n              if (user._id === Comment.commenterId) return user.picture;else return null;\n            }).join(\"\"),\n            alt: \"commenter-pic\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 22,\n            columnNumber: 25\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 21,\n          columnNumber: 25\n        }, this)\n      }, comment._id, false, {\n        fileName: _jsxFileName,\n        lineNumber: 20,\n        columnNumber: 21\n      }, this);\n    })\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 17,\n    columnNumber: 9\n  }, this);\n};\n_s(CardComments, \"6ScVieF1rs5rmmlSzOFEQukQfN0=\", false, function () {\n  return [useSelector, useSelector, useDispatch];\n});\n_c = CardComments;\nexport default CardComments;\nvar _c;\n$RefreshReg$(_c, \"CardComments\");","map":{"version":3,"names":["React","useState","useDispatch","useSelector","isEmpty","CardComments","post","Text","setText","usersData","state","usersReducer","userData","userReducer","dispatch","handleComment","postMessage","comments","map","comment","commenterId","_id","user","Comment","picture","join"],"sources":["C:/Users/user/Desktop/05mediaSocial/client/src/components/Post/CardComments.js"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport { useDispatch,useSelector } from \"react-redux\";\r\nimport { isEmpty } from \"../Utils\";\r\n\r\n\r\nconst CardComments=(post)=>{\r\n    const{Text,setText}=useState(\"\");\r\n    const usersData=useSelector((state)=>state.usersReducer)\r\n    const userData=useSelector((state)=>state.userReducer)\r\n    const dispatch=useDispatch();\r\n\r\n    const handleComment=()=>{\r\n\r\n    }\r\n\r\n    return(\r\n        <div className=\"comments-container\">\r\n            {postMessage.comments.map((comment)=>{\r\n                return(\r\n                    <div className={comments.commenterId === userData._id ? \"comment-container client\" : \"comments-container\" }key={comment._id}>\r\n                        <div className=\"left-part\">\r\n                        <img\r\n              src={\r\n                !isEmpty(usersData[0]) &&\r\n                usersData\r\n                  .map((user) => {\r\n                    if (user._id === Comment.commenterId) return user.picture;\r\n                    else return null;\r\n                  })\r\n                  .join(\"\")\r\n              }\r\n              alt=\"commenter-pic\"/>\r\n                        </div>\r\n                    </div>\r\n\r\n                )\r\n            })}\r\n        </div>\r\n    )\r\n};\r\n\r\nexport default CardComments"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,WAAW,EAACC,WAAW,QAAQ,aAAa;AACrD,SAASC,OAAO,QAAQ,UAAU;AAAC;AAGnC,MAAMC,YAAY,GAAEC,IAAI,IAAG;EAAA;EACvB,MAAK;IAACC,IAAI;IAACC;EAAO,CAAC,GAACP,QAAQ,CAAC,EAAE,CAAC;EAChC,MAAMQ,SAAS,GAACN,WAAW,CAAEO,KAAK,IAAGA,KAAK,CAACC,YAAY,CAAC;EACxD,MAAMC,QAAQ,GAACT,WAAW,CAAEO,KAAK,IAAGA,KAAK,CAACG,WAAW,CAAC;EACtD,MAAMC,QAAQ,GAACZ,WAAW,EAAE;EAE5B,MAAMa,aAAa,G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