-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 14.9 KB
/
.eslintcache
1
[{"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/index.js":"1","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/App.js":"2","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/serviceWorker.js":"3","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/app/store.js":"4","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Sidebar.js":"5","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/SidebarChannel.jsx":"6","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Chat.jsx":"7","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/ChatHeader.jsx":"8","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Message.jsx":"9","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/features/userSlice.js":"10","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/features/appSlice.js":"11","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Login.jsx":"12","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/firebase.js":"13"},{"size":644,"mtime":1609056932019,"results":"14","hashOfConfig":"15"},{"size":1043,"mtime":1609398369048,"results":"16","hashOfConfig":"15"},{"size":5141,"mtime":1609056932021,"results":"17","hashOfConfig":"15"},{"size":254,"mtime":1609075608994,"results":"18","hashOfConfig":"15"},{"size":3367,"mtime":1609394647559,"results":"19","hashOfConfig":"15"},{"size":716,"mtime":1609394122661,"results":"20","hashOfConfig":"15"},{"size":3084,"mtime":1609399630772,"results":"21","hashOfConfig":"15"},{"size":1805,"mtime":1609399137548,"results":"22","hashOfConfig":"15"},{"size":754,"mtime":1609394021903,"results":"23","hashOfConfig":"15"},{"size":466,"mtime":1609386995132,"results":"24","hashOfConfig":"15"},{"size":525,"mtime":1609389907510,"results":"25","hashOfConfig":"15"},{"size":492,"mtime":1609142487542,"results":"26","hashOfConfig":"15"},{"size":572,"mtime":1609074622978,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},"1qlpozr",{"filePath":"31","messages":"32","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"30"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"30"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43","usedDeprecatedRules":"30"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"46","usedDeprecatedRules":"30"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/index.js",[],["59","60"],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/App.js",["61"],"import React, { useEffect, useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport './App.css';\r\nimport Chat from './Chat';\r\nimport { loginUser,logout , selectUser } from './features/userSlice';\r\nimport Login from './Login';\r\nimport Sidebar from './Sidebar';\r\nimport {auth} from './firebase'\r\n\r\nfunction App() {\r\n\r\n const user = useSelector(selectUser)\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n auth.onAuthStateChanged((authuser) => {\r\n \r\n if (authuser) {\r\n dispatch(loginUser({\r\n uid: authuser.uid,\r\n photo: authuser.photoURL,\r\n email: authuser.email,\r\n displayName:authuser.displayName\r\n }))\r\n } else {\r\n dispatch(logout())\r\n }\r\n })\r\n \r\n }, [dispatch])\r\n\r\n return (\r\n <>\r\n {user ? <div className=\"app grid grid-cols-5 bg-gray-800 \">\r\n <Sidebar />\r\n <Chat />\r\n </div> \r\n :\r\n <Login />\r\n }\r\n </>\r\n \r\n \r\n\r\n \r\n );\r\n}\r\n\r\nexport default App;\r\n","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/serviceWorker.js",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/app/store.js",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Sidebar.js",["62","63","64","65"],"import { Avatar } from \"@material-ui/core\";\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { selectUser } from \"./features/userSlice\";\nimport db, { auth } from \"./firebase\";\nimport SidebarChannel from \"./SidebarChannel\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport SettingsIcon from \"@material-ui/icons/Settings\";\nimport MicIcon from \"@material-ui/icons/Mic\";\nimport InfoOutlinedIcon from \"@material-ui/icons/InfoOutlined\";\nimport PhoneIcon from \"@material-ui/icons/Phone\";\nimport SignalCellularAltIcon from \"@material-ui/icons/SignalCellularAlt\";\nimport {useDispatch} from 'react-redux'\nimport {\n setChannel,\n selectChannelId,\n selectChannel,\n} from \"./features/appSlice\";\n\nfunction Sidebar() {\n const user = useSelector(selectUser);\n const [channels, setChannels] = useState([]);\n const dispatch = useDispatch()\n \n const handleAddChannel = () => {\n const channelName = prompt(\"Please Enter channel name : \");\n db.collection(\"channels\").add({\n channelName,\n });\n };\n useEffect(() => {\n db.collection(\"channels\").onSnapshot((snapshot) => {\n setChannels(\n snapshot.docs.map((doc) => ({\n id: doc.id,\n channel: doc.data(),\n }))\n );\n \n });\n }, []);\n return (\n <>\n <div className=\"sidebar sticky top-0 flex flex-col col-span-2 lg:col-span-1 h-screen bg-gray-900\">\n <div className=\"sidebar__top text-white flex justify-between p-4 border-gray-600 border-b-2\">\n <h3>Clever Programmer</h3>\n <span className=\"sidebar__top__icon \">\n <ExpandMoreIcon />\n </span>\n </div>\n <div className=\"sidebar__channels flex-1\">\n <div className=\"sidebar__channelheaders text-gray-500 flex justify-between p-4\">\n <ExpandMoreIcon />\n <h3>Text Channels</h3>\n <AddIcon onClick={handleAddChannel} />\n </div>\n <div className=\"sidebar__channellists text-gray-500 flex flex-col justify-items-start\">\n {channels.map(({ id, channel }) => (\n <SidebarChannel key={id} id={id} channel={channel} />\n ))}\n </div>\n </div>\n\n <div className=\"sidebar__voice flex justify-between items-center border-t-2 border-b-2 border-gray-500 text-green-500 h-32 px-2 py-1\">\n <div className=\"mr-1\">\n <SignalCellularAltIcon />\n </div>\n <div className=\"flex flex-col \">\n <h3>Voice Connected</h3>\n <p className=\"text-gray-600\">Stream</p>\n </div>\n <div className=\"flex flex-col ml-1\">\n <InfoOutlinedIcon />\n <PhoneIcon />\n </div>\n </div>\n\n <div className=\"sidebar__profile h-32 flex justify-between p-2 items-center\">\n <Avatar\n src={user.photo}\n onClick={() => auth.signOut()}\n className=\"mr-1\"\n />\n\n <div className=\"text-white text-base\">\n <h3>@{user.displayName}</h3>\n <p>#ThisisMyId</p>\n </div>\n <div className=\"flex justify-evenly flex-col items-center text-gray-600 ml-1\">\n <MicIcon />\n <SettingsIcon />\n </div>\n </div>\n </div>\n </>\n );\n}\n\nexport default Sidebar;\n","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/SidebarChannel.jsx",["66","67"],"import React from 'react'\nimport { useDispatch } from \"react-redux\";\nimport {\n setChannel,\n selectChannelId,\n selectChannelName,\n} from \"./features/appSlice\";\nfunction SidebarChannel({ channel, id }) {\n\n const dispatch = useDispatch()\n const handleSelectChannel = () => {\n dispatch(\n setChannel({\n id,\n channel: channel\n })\n );\n }\n\n return (\n <div className='sidebar__channel my-2 flex pl-4 flex-1 hover:text-white hover:bg-gray-600 text-lg py-3' onClick={handleSelectChannel}>\n <span className=' '>#</span>\n <h3 className='pl-2'>{channel.channelName}</h3>\n </div>\n )\n}\n\nexport default SidebarChannel\n","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Chat.jsx",["68"],"import React, { useEffect } from 'react'\nimport ChatHeader from './ChatHeader'\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport CardGiftcardIcon from '@material-ui/icons/CardGiftcard';\nimport GifIcon from '@material-ui/icons/Gif';\nimport EmojiEmotionsIcon from '@material-ui/icons/EmojiEmotions';\nimport Message from './Message';\nimport { useSelector } from \"react-redux\";\nimport db from './firebase'\nimport firebase from 'firebase'\nimport {\n setChannel,\n selectChannelId,\n selectChannel,\n} from \"./features/appSlice\";\nimport { useState } from 'react';\nimport { selectUser } from './features/userSlice';\n\nfunction Chat() {\n\n const [messages , setMessages] = useState([])\n const channel = useSelector(selectChannel)\n const channelId = useSelector(selectChannelId);\n const user = useSelector(selectUser);\n const [input, setInput] = useState(\"\");\n\n useEffect(() => {\n if (channelId) {\n db.collection(\"channels\")\n .doc(channelId)\n .collection(\"messages\")\n .orderBy(\"timestamp\", \"desc\")\n .onSnapshot((snapshot) => {\n setMessages(snapshot.docs.map((doc) => doc.data()));\n });\n }\n }, [channelId]);\n\n const handleSubmit = (e) => {\n e.preventDefault()\n db.collection(\"channels\").doc(channelId).collection(\"messages\")\n .add({\n message: input,\n user: user,\n timestamp:firebase.firestore.FieldValue.serverTimestamp()\n });\n setInput('')\n }\n\n return (\n <div className=\"col-span-3 max-h-screen chat relative lg:col-span-4 flex flex-col justify-center \">\n <ChatHeader channelName={channel?.channelName} />\n <div className=\"chat__messages flex-1 overflow-scroll w-full\">\n {messages?.map((message) => (\n <Message user={user} message={message} />\n ))}\n </div>\n <div className=\"chat__input absolute bottom-0 flex justify-between z-10 bg-gray-700 p-4 w-full\">\n <div className=\"flex-1 flex \">\n <AddCircleIcon className=\"text-white\" />\n <form className=\"pl-2 flex-1\">\n <input\n value={input}\n className=\"w-full outline-none text-white bg-transparent\"\n placeholder={`message #${channel?.channelName ? channel.channelName : 'channel' }`}\n type='text'\n onChange={(e) => setInput(e.target.value)}\n disabled={!channelId}\n />\n <button\n type=\"submit\"\n className=\"hidden\"\n onClick={(e) => handleSubmit(e)}\n disabled={!channelId}\n >\n Send Message\n </button>\n </form>\n </div>\n <div className=\"flex text-white \">\n <CardGiftcardIcon fontSize=\"Large\" />\n <GifIcon fontSize=\"Large\" />\n <EmojiEmotionsIcon fontSize=\"Large\" />\n </div>\n </div>\n </div>\n );\n}\n\nexport default Chat\n","/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/ChatHeader.jsx",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Message.jsx",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/features/userSlice.js",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/features/appSlice.js",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/Login.jsx",[],"/Users/ibrahimgabr/Desktop/My Portfolio/react/discord-redux-clone/src/firebase.js",[],{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","severity":1,"message":"74","line":1,"column":28,"nodeType":"75","messageId":"76","endLine":1,"endColumn":36},{"ruleId":"73","severity":1,"message":"77","line":16,"column":3,"nodeType":"75","messageId":"76","endLine":16,"endColumn":13},{"ruleId":"73","severity":1,"message":"78","line":17,"column":3,"nodeType":"75","messageId":"76","endLine":17,"endColumn":18},{"ruleId":"73","severity":1,"message":"79","line":18,"column":3,"nodeType":"75","messageId":"76","endLine":18,"endColumn":16},{"ruleId":"73","severity":1,"message":"80","line":24,"column":11,"nodeType":"75","messageId":"76","endLine":24,"endColumn":19},{"ruleId":"73","severity":1,"message":"78","line":5,"column":3,"nodeType":"75","messageId":"76","endLine":5,"endColumn":18},{"ruleId":"73","severity":1,"message":"81","line":6,"column":3,"nodeType":"75","messageId":"76","endLine":6,"endColumn":20},{"ruleId":"73","severity":1,"message":"77","line":12,"column":3,"nodeType":"75","messageId":"76","endLine":12,"endColumn":13},"no-native-reassign",["82"],"no-negated-in-lhs",["83"],"no-unused-vars","'useState' is defined but never used.","Identifier","unusedVar","'setChannel' is defined but never used.","'selectChannelId' is defined but never used.","'selectChannel' is defined but never used.","'dispatch' is assigned a value but never used.","'selectChannelName' is defined but never used.","no-global-assign","no-unsafe-negation"]