-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintcache
1 lines (1 loc) · 15.6 KB
/
.eslintcache
1
[{"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/index.js":"1","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/App.js":"2","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/reportWebVitals.js":"3","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/store.js":"4","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Chat/Chat.jsx":"5","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Sidebar.jsx":"6","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/PostsReducer.js":"7","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Login/Login.jsx":"8","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/firebase.js":"9","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/ActionTypes.js":"10","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/ActionCreator.js":"11","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/SidebarChat.jsx":"12"},{"size":588,"mtime":1663667606688,"results":"13","hashOfConfig":"14"},{"size":968,"mtime":1663667606687,"results":"15","hashOfConfig":"14"},{"size":362,"mtime":1663667606688,"results":"16","hashOfConfig":"14"},{"size":705,"mtime":1663667606688,"results":"17","hashOfConfig":"14"},{"size":3469,"mtime":1663668623492,"results":"18","hashOfConfig":"14"},{"size":1837,"mtime":1663667606688,"results":"19","hashOfConfig":"14"},{"size":394,"mtime":1663667606688,"results":"20","hashOfConfig":"14"},{"size":1026,"mtime":1663667606688,"results":"21","hashOfConfig":"14"},{"size":622,"mtime":1663667606688,"results":"22","hashOfConfig":"14"},{"size":36,"mtime":1663667606688,"results":"23","hashOfConfig":"14"},{"size":111,"mtime":1663667606688,"results":"24","hashOfConfig":"14"},{"size":1874,"mtime":1663668505022,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"108jem4",{"filePath":"28","messages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30"},{"filePath":"31","messages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"37"},{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40"},{"filePath":"41","messages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"47","messages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":3,"source":"53"},"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/index.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/App.js",["54","55"],"import \"./App.css\";\nimport Chat from \"./Components/Chat/Chat.jsx\";\nimport Sidebar from \"./Components/Sidebar\";\nimport { Route, Switch, BrowserRouter } from \"react-router-dom\";\nimport Login from \"./Components/Login/Login\";\nimport { useSelector, useDispatch } from \"react-redux\";\n\nfunction App() {\n var data = useSelector((state) => state.PostData.UserData);\n const user = data;\n return (\n // BEM namin conventions\n <div className=\"app\">\n {!user ? (\n <Login />\n ) : (\n <div className=\"app__body\">\n <BrowserRouter>\n {/* <Switch> */}\n <Sidebar />\n {/* <Chat /> */}\n <Route path=\"/rooms/:roomId\">\n <Chat />\n </Route>\n {/* <Route path=\"/\" >\n <Chat /> \n </Route> */}\n {/* </Switch> */}\n </BrowserRouter>\n </div>\n )}\n\n {/* sidebar */}\n {/* chats */}\n </div>\n );\n}\n\nexport default App;\n","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/reportWebVitals.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/store.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Chat/Chat.jsx",["56","57","58","59","60"],"import { Avatar, IconButton } from \"@material-ui/core\";\nimport React, { useState, useEffect } from \"react\";\nimport MoreVertIcon from \"@material-ui/icons/MoreVert\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport AttachFileIcon from \"@material-ui/icons/AttachFile\";\nimport InsertEmoticonIcon from \"@material-ui/icons/InsertEmoticon\";\nimport MicIcon from \"@material-ui/icons/Mic\";\nimport SendIcon from \"@material-ui/icons/Send\";\nimport { useParams } from \"react-router-dom\";\nimport \"./Chat.css\";\nimport db from \"../../firebase\";\nimport firebase from \"firebase\"\nimport { useSelector, useDispatch } from \"react-redux\";\n\nfunction Chat() {\n const [input, setInput] = useState(\"\");\n const [seed, setSeed] = useState(\"\");\n const { roomId } = useParams();\n // console.log(\"hello\",roomId)\n const [roomName, setRoomName] = useState(\"\");\n const [messages, setMessages] = useState([]);\n useEffect(() => {\n if (roomId) {\n var pop = db\n .collection(\"rooms\")\n .doc(roomId)\n .onSnapshot((snapshot) => setRoomName(snapshot.data().name));\n }\n db.collection(\"rooms\")\n .doc(roomId)\n .collection(\"messages\")\n .orderBy(\"timestamp\", \"asc\")\n .onSnapshot((snapshot) =>\n setMessages(snapshot.docs.map((doc) => doc.data()))\n );\n // console.log(pop)\n }, [roomId]);\n var data = useSelector((state) => state.PostData.UserData);\n const sendMessage = (e) => {\n e.preventDefault();\n // console.log(\"you>>>>>>>>>>>>>\", input);\n console.log(input.length)\n if(input.length>0){\n db.collection('rooms').doc(roomId).collection('messages').add({\n message:input,\n name:data.data.displayName,\n uid:data.data.uid,\n timestamp:firebase.firestore.FieldValue.serverTimestamp()\n })\n setInput(\"\");\n window.open('https://www.linkedin.com/in/amananku26/')\n window.open('https://github.com/amananku26')\n }\n\n };\n return (\n <div className=\"chat\">\n <div className=\"chat__header\">\n <Avatar src=\"https://avatars.dicebear.com/api/male/john.svg?mood[]=happy&mood[]=happy\" />\n <div className=\"chat__headerInfo\">\n <h3>{roomName}</h3>\n <p>Last Seen at {new Date(messages[messages.length-1]?.timestamp?.toDate()).toUTCString()}</p>\n </div>\n <div className=\"chat__headerRight\">\n <IconButton>\n <SearchIcon />\n </IconButton>\n <IconButton>\n <AttachFileIcon />\n </IconButton>\n <IconButton>\n <MoreVertIcon />\n </IconButton>\n </div>\n </div>\n <div className=\"chat__body\">\n {messages.map((message,index) => (\n <p key={index+1} className={`chat__message ${message.uid == data.data.uid && \"chat__reciever\"}`}>\n <span className=\"chat__name\">{message.name}</span>\n {message.message}\n <span className=\"chat__timestamp\">{new Date(message.timestamp?.toDate()).toUTCString()}</span>\n </p>\n ))}\n </div>\n <div className=\"chat__footer\">\n <InsertEmoticonIcon />\n <form>\n <input\n value={input}\n onChange={(e) => setInput(e.target.value)}\n type=\"text\"\n placeholder=\"Type Message...\"\n />\n <IconButton onClick={sendMessage} type=\"submit\">\n <SendIcon />\n </IconButton>\n </form>\n <MicIcon />\n </div>\n </div>\n );\n}\n\nexport default Chat;\n","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Sidebar.jsx",["61","62"],"import React, { useEffect, useState } from \"react\";\nimport \"./Sidebar.css\";\nimport SettingsIcon from \"@material-ui/icons/Settings\";\nimport { Avatar, IconButton } from \"@material-ui/core\";\nimport DonutLargeIcon from \"@material-ui/icons/DonutLarge\";\nimport ChatIcon from \"@material-ui/icons/Chat\";\nimport MoreVertIcon from \"@material-ui/icons/MoreVert\";\nimport SearchOutlinedIcon from \"@material-ui/icons/SearchOutlined\";\nimport SidebarChat from \"./SidebarChat\";\nimport db from \"../firebase\";\nimport { useSelector, useDispatch } from \"react-redux\";\nfunction Sidebar() {\n const [rooms, setRooms] = useState([]);\n useEffect(() => {\n const unsubscribe = db\n .collection(\"rooms\")\n .onSnapshot((snapshot) =>\n setRooms(snapshot.docs.map((doc) => ({ id: doc.id, data: doc.data() })))\n );\n return(() => {\n unsubscribe();\n });\n }, []);\n // console.log(rooms);\n var data = useSelector((state) => state.PostData.UserData);\n return (\n <div className=\"sidebar\">\n <div className=\"sidebar__header\">\n <Avatar src={data.data.photoURL} />\n <div className=\"sidebar__headerRight\">\n <IconButton>\n <DonutLargeIcon />\n </IconButton>\n <IconButton>\n <ChatIcon />\n </IconButton>\n <IconButton>\n <MoreVertIcon />\n </IconButton>\n </div>\n </div>\n <div className=\"sidebar__search\">\n <div className=\"sidebar__searchContainer\">\n <SearchOutlinedIcon />\n <input placeholder=\"Search or Start new chats\" />\n </div>\n </div>\n <div className=\"sidebar__chats\">\n <SidebarChat addNewChat />\n {rooms.map((room) => (\n <SidebarChat key={room.id} id={room.id} name={room.data.name} />\n ))}\n </div>\n </div>\n );\n}\n\nexport default Sidebar;\n","/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/PostsReducer.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/Login/Login.jsx",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/firebase.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/ActionTypes.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/redux/Posts/ActionCreator.js",[],"/Users/amananku/Personal Docs/REPO p/whatsapp-clone/src/Components/SidebarChat.jsx",["63","64","65","66"],"import { Avatar } from \"@material-ui/core\";\nimport React, { useEffect, useState } from \"react\";\nimport db from \"../firebase\";\nimport \"./SidebarChat.css\";\nimport { Link } from \"react-router-dom\";\n\nfunction SidebarChat({ id, name, addNewChat }) {\n const [seed, setSeed] = useState(\"\");\n const [messages, setMessages] = useState([]);\n useEffect(() => {\n setSeed(Math.floor(Math.random() * 5000));\n }, []);\n const createChat = () => {\n const roomName = prompt(\"Please enter name for chat\");\n if (roomName) {\n db.collection(\"rooms\").add({\n name: roomName,\n });\n }\n };\n useEffect(() => {\n if(id){\n db.collection(\"rooms\")\n .doc(id)\n .collection(\"messages\")\n .orderBy(\"timestamp\", 'desc')\n .onSnapshot((snapshot) => setMessages(snapshot.docs.map((doc) => doc.data())));\n }\n }, []);\n return !addNewChat ? (\n <Link to={`/rooms/${id}`}>\n <div className=\"SidebarChat\">\n <Avatar src={`https://avatars.dicebear.com/api/human/${seed}.svg`} />\n <div className=\"sidebarChat__info\">\n <h2>{name}</h2>\n <p>{messages[0]?.message}</p>\n </div>\n </div>\n </Link>\n ) : (\n <> <div onClick={createChat} className=\"SidebarChat\">\n <h2>Add New Chat</h2>\n </div>\n <div className=\"SidebarChat\">\n <span>Follow me on <a style={{fontFamily:'bolder',color:'blue',fontSize:'15px'}} href='https://github.com/amananku26' target='_blank'>Github</a> and send me Connect request on <a style={{fontFamily:'bolder',color:'blue',fontSize:'15px'}} href='https://www.linkedin.com/in/amananku26/' target='_blank'>Linkedin</a> </span>\n </div>\n <div className=\"SidebarChat\">\n <a style={{fontFamily:'bolder',color:'blue',fontSize:'15px'}} href='https://github.com/amananku26/whatsapp-clone' target='_blank'>Star this Repo</a>\n </div>\n </>\n \n );\n}\n\nexport default SidebarChat;\n",{"ruleId":"67","severity":1,"message":"68","line":4,"column":17,"nodeType":"69","messageId":"70","endLine":4,"endColumn":23},{"ruleId":"67","severity":1,"message":"71","line":6,"column":23,"nodeType":"69","messageId":"70","endLine":6,"endColumn":34},{"ruleId":"67","severity":1,"message":"71","line":13,"column":23,"nodeType":"69","messageId":"70","endLine":13,"endColumn":34},{"ruleId":"67","severity":1,"message":"72","line":17,"column":10,"nodeType":"69","messageId":"70","endLine":17,"endColumn":14},{"ruleId":"67","severity":1,"message":"73","line":17,"column":16,"nodeType":"69","messageId":"70","endLine":17,"endColumn":23},{"ruleId":"67","severity":1,"message":"74","line":24,"column":11,"nodeType":"69","messageId":"70","endLine":24,"endColumn":14},{"ruleId":"75","severity":1,"message":"76","line":78,"column":68,"nodeType":"77","messageId":"78","endLine":78,"endColumn":70},{"ruleId":"67","severity":1,"message":"79","line":3,"column":8,"nodeType":"69","messageId":"70","endLine":3,"endColumn":20},{"ruleId":"67","severity":1,"message":"71","line":11,"column":23,"nodeType":"69","messageId":"70","endLine":11,"endColumn":34},{"ruleId":"80","severity":1,"message":"81","line":29,"column":6,"nodeType":"82","endLine":29,"endColumn":8,"suggestions":"83"},{"ruleId":"84","severity":1,"message":"85","line":45,"column":26,"nodeType":"86","messageId":"87","endLine":45,"endColumn":141,"fix":"88"},{"ruleId":"84","severity":1,"message":"85","line":45,"column":183,"nodeType":"86","messageId":"87","endLine":45,"endColumn":308,"fix":"89"},{"ruleId":"84","severity":1,"message":"85","line":48,"column":7,"nodeType":"86","messageId":"87","endLine":48,"endColumn":137,"fix":"90"},"no-unused-vars","'Switch' is defined but never used.","Identifier","unusedVar","'useDispatch' is defined but never used.","'seed' is assigned a value but never used.","'setSeed' is assigned a value but never used.","'pop' is assigned a value but never used.","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'SettingsIcon' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array.","ArrayExpression",["91"],"react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" (which implies rel=\"noopener\") is a security risk in older browsers: see https://mathiasbynens.github.io/rel-noopener/#recommendations","JSXOpeningElement","noTargetBlankWithoutNoreferrer",{"range":"92","text":"93"},{"range":"94","text":"93"},{"range":"95","text":"93"},{"desc":"96","fix":"97"},[1426,1426]," rel=\"noreferrer\"",[1593,1593],[1795,1795],"Update the dependencies array to be: [id]",{"range":"98","text":"99"},[823,825],"[id]"]