-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 28.7 KB
/
.eslintcache
1
[{"E:\\courses\\Mern\\Story\\client\\src\\index.js":"1","E:\\courses\\Mern\\Story\\client\\src\\App.js":"2","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryScreen.jsx":"3","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryDetailScreen.jsx":"4","E:\\courses\\Mern\\Story\\client\\src\\data.js":"5","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\AuthorDetailScreen.jsx":"6","E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\Tabs.jsx":"7","E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\About.jsx":"8","E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\AuthorStories.jsx":"9","E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\Story.jsx":"10","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\AuthorsScreen.jsx":"11","E:\\courses\\Mern\\Story\\client\\src\\store.js":"12","E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\storyReducers.js":"13","E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\storyAction.js":"14","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\LoadingBox.js":"15","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\MessageBox.js":"16","E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\Comment.jsx":"17","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Nav.jsx":"18","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Sidebar.jsx":"19","E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\storyConstants.js":"20","E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\userReducers.js":"21","E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\userConstants.js":"22","E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\userAction.js":"23","E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Login.jsx":"24","E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Register.jsx":"25","E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Profile.jsx":"26","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\PrivateRoute.js":"27","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\MyStoriesScreen.jsx":"28","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\WriteStoryScreen.jsx":"29","E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\ProfileUpperbox.jsx":"30","E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryUpdateScreen.jsx":"31","E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\commentReducers.js":"32","E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\commentConstants.js":"33","E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\commentAction.js":"34","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Modal.jsx":"35"},{"size":341,"mtime":1612240831787,"results":"36","hashOfConfig":"37"},{"size":2620,"mtime":1615953238208,"results":"38","hashOfConfig":"37"},{"size":866,"mtime":1615952452592,"results":"39","hashOfConfig":"37"},{"size":1540,"mtime":1615952398888,"results":"40","hashOfConfig":"37"},{"size":1699,"mtime":1611993463211,"results":"41","hashOfConfig":"37"},{"size":2124,"mtime":1615952235760,"results":"42","hashOfConfig":"37"},{"size":1367,"mtime":1612691994792,"results":"43","hashOfConfig":"37"},{"size":1281,"mtime":1615868400544,"results":"44","hashOfConfig":"37"},{"size":1378,"mtime":1615900221690,"results":"45","hashOfConfig":"37"},{"size":2140,"mtime":1615952793972,"results":"46","hashOfConfig":"37"},{"size":2559,"mtime":1615952347652,"results":"47","hashOfConfig":"37"},{"size":1681,"mtime":1615992825757,"results":"48","hashOfConfig":"37"},{"size":4023,"mtime":1615992791111,"results":"49","hashOfConfig":"37"},{"size":4495,"mtime":1615992674255,"results":"50","hashOfConfig":"37"},{"size":446,"mtime":1615953168908,"results":"51","hashOfConfig":"37"},{"size":222,"mtime":1615953184281,"results":"52","hashOfConfig":"37"},{"size":5955,"mtime":1615952636993,"results":"53","hashOfConfig":"37"},{"size":2021,"mtime":1615955008292,"results":"54","hashOfConfig":"37"},{"size":1359,"mtime":1615953266368,"results":"55","hashOfConfig":"37"},{"size":1783,"mtime":1615992454859,"results":"56","hashOfConfig":"37"},{"size":2721,"mtime":1615953350103,"results":"57","hashOfConfig":"37"},{"size":1175,"mtime":1615953308344,"results":"58","hashOfConfig":"37"},{"size":4013,"mtime":1613901470356,"results":"59","hashOfConfig":"37"},{"size":2473,"mtime":1615727891867,"results":"60","hashOfConfig":"37"},{"size":3268,"mtime":1615952969574,"results":"61","hashOfConfig":"37"},{"size":6402,"mtime":1615953010539,"results":"62","hashOfConfig":"37"},{"size":599,"mtime":1613704326078,"results":"63","hashOfConfig":"37"},{"size":1344,"mtime":1615993459044,"results":"64","hashOfConfig":"37"},{"size":4135,"mtime":1615952499463,"results":"65","hashOfConfig":"37"},{"size":882,"mtime":1615952752896,"results":"66","hashOfConfig":"37"},{"size":5452,"mtime":1615952462584,"results":"67","hashOfConfig":"37"},{"size":1943,"mtime":1615953359095,"results":"68","hashOfConfig":"37"},{"size":750,"mtime":1615953316936,"results":"69","hashOfConfig":"37"},{"size":2840,"mtime":1615129289459,"results":"70","hashOfConfig":"37"},{"size":1249,"mtime":1615953205770,"results":"71","hashOfConfig":"37"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},"qgnyug",{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"83"},{"filePath":"84","messages":"85","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"86","messages":"87","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"90","messages":"91","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"92","usedDeprecatedRules":"74"},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"109","messages":"110","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"111","usedDeprecatedRules":"74"},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"120","messages":"121","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"126","messages":"127","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"128","usedDeprecatedRules":"74"},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"133","messages":"134","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"135","usedDeprecatedRules":"74"},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"138","messages":"139","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"140","messages":"141","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"142","messages":"143","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"144","messages":"145","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"146","messages":"147","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"148"},"E:\\courses\\Mern\\Story\\client\\src\\index.js",[],["149","150"],"E:\\courses\\Mern\\Story\\client\\src\\App.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryDetailScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\data.js",[],["151","152"],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\AuthorDetailScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\Tabs.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\About.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\TabsComponents\\AuthorStories.jsx",["153"],"import React, { Fragment, useEffect } from \"react\";\r\n\r\nimport Story from \"../StoryComponents/Story\";\r\n\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { authorListStories } from \"../../redux/actions/storyAction\";\r\nimport LoadingBox from \"../utilityComponents/LoadingBox\";\r\nimport MessageBox from \"../utilityComponents/MessageBox\";\r\n\r\nfunction AuthorStories(props) {\r\n const dispatch = useDispatch();\r\n const storyAuthorList = useSelector((state) => state.storyAuthorList);\r\n\r\n const { loading, error, stories } = storyAuthorList;\r\n\r\n useEffect(() => {\r\n dispatch(authorListStories(props.authorId));\r\n }, [dispatch, props.authorId]);\r\n\r\n return (\r\n <div className=\"author-stories-box\">\r\n {loading ? (\r\n <LoadingBox />\r\n ) : error ? (\r\n <MessageBox variant=\"danger\">{error}</MessageBox>\r\n ) : (\r\n <div className=\"row\">\r\n {stories.length === 0 ? (\r\n <MessageBox variant=\"danger\">{\"No Stories\"}</MessageBox>\r\n ) : (\r\n stories.map((s) => <Story story={s} key={s._id} />)\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nexport default AuthorStories;\r\n\r\n// stories && stories.length === 0 ? <MessageBox variant=\"danger\">{'No Stories'}</MessageBox>\r\n\r\n// :stories.map((s) => (\r\n// <Story story={s} key={s._id} />\r\n// ))\r\n","E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\Story.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\AuthorsScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\store.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\storyReducers.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\storyAction.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\LoadingBox.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\MessageBox.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\Comment.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Nav.jsx",["154"],"import React, { useState } from \"react\";\r\nimport { FaBookReader, FaCaretDown } from \"react-icons/fa\";\r\nimport { BiMenuAltLeft } from \"react-icons/bi\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport \"./nav.scss\";\r\n\r\nconst Dropdown = (props) => {\r\n const { signoutHandler } = props;\r\n\r\n return (\r\n <div className=\"dropdown\">\r\n <ul className=\"dropdown-content\">\r\n <li>\r\n <Link to=\"/profile\">Profile</Link>\r\n </li>\r\n <li>\r\n <Link to=\"#\" onClick={signoutHandler}>\r\n SignOut\r\n </Link>\r\n </li>\r\n </ul>\r\n </div>\r\n );\r\n};\r\n\r\nfunction Nav(props) {\r\n const userSignin = useSelector((state) => state.userSignin);\r\n\r\n const { userInfo } = userSignin;\r\n\r\n const [toggle, setToggle] = useState(false);\r\n\r\n const DropdownHandler = () => {\r\n setToggle(!toggle);\r\n };\r\n const defaultImageLink = \"uploads/default.jpeg\";\r\n return (\r\n <nav>\r\n <div className=\"toggle-menu\">\r\n <BiMenuAltLeft size=\"2em\" onClick={props.handleToggleClick} />\r\n </div>\r\n\r\n <div className=\"nav-brand\">\r\n <Link to=\"/stories\" className=\"nav__brand__link\">\r\n <FaBookReader />\r\n <h1>Stories</h1>\r\n </Link>\r\n </div>\r\n <ul>\r\n {userInfo ? (\r\n <div onClick={DropdownHandler}>\r\n <img\r\n src={\r\n userInfo.profileImage === '' ? defaultImageLink : userInfo.profileImage\r\n }\r\n alt=\"profile\"\r\n className=\"nav__profileAvatar\"\r\n />\r\n\r\n {toggle && (\r\n <Dropdown\r\n userInfo={userInfo}\r\n signoutHandler={props.signoutHandler}\r\n />\r\n )}\r\n </div>\r\n ) : (\r\n <li className=\"nav__item\">\r\n <Link to=\"/login\" className=\"nav__link\">\r\n SignIn\r\n </Link>\r\n </li>\r\n )}\r\n </ul>\r\n </nav>\r\n );\r\n}\r\n\r\nexport default Nav;\r\n","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Sidebar.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\storyConstants.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\userReducers.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\userConstants.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\userAction.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Login.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Register.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\UserComponents\\Profile.jsx",["155"],"import React, { useEffect, useRef, useState } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { AUTHOR_UPDATE_PROFILE_RESET } from \"../../redux/actionConstants/userConstants\";\r\nimport {\r\n authorInformation,\r\n updateAuthorProfile,\r\n} from \"../../redux/actions/userAction\";\r\nimport ProfileUpperbox from \"../StoryComponents/ProfileUpperbox\";\r\nimport LoadingBox from \"../utilityComponents/LoadingBox\";\r\nimport MessageBox from \"../utilityComponents/MessageBox\";\r\nimport \"./profile.scss\";\r\n\r\nfunction Profile() {\r\n const [username, setUsername] = useState(\"\");\r\n const [about, setAbout] = useState(\"\");\r\n const [email, setEmail] = useState(\"\");\r\n const [facebookAddress, setFacebookAddress] = useState(\"\");\r\n const [twitterAddress, setTwitterAddress] = useState(\"\");\r\n const [instagramAddress, setInstagramAddress] = useState(\"\");\r\n const [profileImage, setprofileImage] = useState(\"\");\r\n const [imageName, setImageName] = useState(\"\");\r\n const dispatch = useDispatch();\r\n\r\n const userSignin = useSelector((state) => state.userSignin);\r\n const { userInfo } = userSignin;\r\n\r\n const authorInfo = useSelector((state) => state.authorInfo);\r\n const { loading, error, authorBio } = authorInfo;\r\n\r\n const authorUpdateProfile = useSelector((state) => state.authorUpdateProfile);\r\n const {\r\n loading: loadingUpdate,\r\n error: errorUpdate,\r\n success: successUpdate,\r\n } = authorUpdateProfile;\r\n\r\n const profileRef = useRef();\r\n\r\n useEffect(() => {\r\n dispatch(authorInformation(userInfo._id));\r\n // eslint-disable-next-line no-sparse-arrays\r\n }, [dispatch, userInfo._id]);\r\n\r\n useEffect(() => {\r\n if (authorBio !== undefined) {\r\n setUsername(authorBio.username);\r\n setEmail(authorBio.email);\r\n setAbout(authorBio.about);\r\n setFacebookAddress(authorBio.facebookAddress);\r\n setTwitterAddress(authorBio.twitterAddress);\r\n setInstagramAddress(authorBio.instagramAddress);\r\n setImageName(authorBio.profileImage);\r\n }\r\n }, [authorBio]);\r\n\r\n useEffect(() => {\r\n if (successUpdate) {\r\n setTimeout(() => {\r\n dispatch({ type: AUTHOR_UPDATE_PROFILE_RESET });\r\n }, 4000);\r\n }\r\n }, [dispatch, successUpdate]);\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n const profileData = new FormData(profileRef.current);\r\n\r\n dispatch(updateAuthorProfile(profileData));\r\n };\r\n\r\n return (\r\n <div className=\"container\">\r\n <div className=\"author-box\">\r\n {loading ? (\r\n <LoadingBox></LoadingBox>\r\n ) : error ? (\r\n <MessageBox variant=\"danger\">{error}</MessageBox>\r\n ) : (\r\n <React.Fragment>\r\n <ProfileUpperbox\r\n username={username}\r\n email={email}\r\n profileImage={imageName}\r\n >\r\n {\"Profile Info\"}\r\n </ProfileUpperbox>\r\n\r\n <form onSubmit={handleSubmit} ref={profileRef}>\r\n {loadingUpdate && <LoadingBox></LoadingBox>}\r\n {errorUpdate && (\r\n <MessageBox variant=\"danger\">{errorUpdate}</MessageBox>\r\n )}\r\n {successUpdate && (\r\n <MessageBox variant=\"success\">\r\n Profile Updated Successfully\r\n </MessageBox>\r\n )}\r\n <div className=\"profile-wrap-input\">\r\n <input\r\n className=\"profile-input-100\"\r\n type=\"text\"\r\n name=\"username\"\r\n placeholder=\"Username\"\r\n value={username}\r\n onChange={(e) => setUsername(e.target.value)}\r\n />\r\n </div>\r\n <div className=\"profile-wrap-input\">\r\n <input\r\n className=\"profile-input-100\"\r\n type=\"email\"\r\n name=\"email\"\r\n placeholder=\"Email\"\r\n value={email}\r\n onChange={(e) => setEmail(e.target.value)}\r\n />\r\n </div>\r\n <div className=\"profile-wrap-input\">\r\n <textarea\r\n className=\"profile-input-100 profile-input-textarea\"\r\n name=\"about\"\r\n placeholder=\"About\"\r\n value={about}\r\n onChange={(e) => setAbout(e.target.value)}\r\n />\r\n </div>\r\n <div className=\"profile-wrap-input\">\r\n <input\r\n className=\"profile-input-100\"\r\n name=\"facebookAddress\"\r\n type=\"text\"\r\n placeholder=\"facebookAddress\"\r\n value={facebookAddress}\r\n onChange={(e) => setFacebookAddress(e.target.value)}\r\n />\r\n </div>\r\n\r\n <div className=\"profile-wrap-input\">\r\n <input\r\n className=\"profile-input-100\"\r\n name=\"twitterAddress\"\r\n type=\"text\"\r\n placeholder=\"twitterAddress\"\r\n value={twitterAddress}\r\n onChange={(e) => setTwitterAddress(e.target.value)}\r\n />\r\n </div>\r\n\r\n <div className=\"profile-wrap-input\">\r\n <input\r\n className=\"profile-input-100\"\r\n name=\"instagramAddress\"\r\n type=\"text\"\r\n placeholder=\"instagramAddress\"\r\n value={instagramAddress}\r\n onChange={(e) => setInstagramAddress(e.target.value)}\r\n />\r\n </div>\r\n <div className=\"profile-wrap-input\">\r\n <label>\r\n {imageName === undefined ? imageName : imageName.slice(-30)}\r\n </label>\r\n {\" \"}\r\n <input\r\n type=\"file\"\r\n name=\"profileImage\"\r\n onChange={(e) => {\r\n setprofileImage(e.target.files[0]);\r\n }}\r\n />\r\n </div>\r\n\r\n <div className=\"profile-wrap-input\">\r\n <button className=\"profile-submit-btn\" type=\"submit\">\r\n Update\r\n </button>\r\n </div>\r\n </form>\r\n </React.Fragment>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default Profile;\r\n","E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\PrivateRoute.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\MyStoriesScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\WriteStoryScreen.jsx",["156"],"import React, { useEffect, useRef, useState } from \"react\";\r\nimport { createStory } from \"../../redux/actions/storyAction\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport LoadingBox from \"../utilityComponents/LoadingBox\";\r\nimport MessageBox from \"../utilityComponents/MessageBox\";\r\nimport { STORY_CREATE_RESET } from \"../../redux/actionConstants/storyConstants\";\r\nimport \"./writeStoryScreen.scss\";\r\nimport ProfileUpperbox from \"../StoryComponents/ProfileUpperbox\";\r\n\r\nfunction WriteStoryScreen(props) {\r\n const [title, setTitle] = useState(\"\");\r\n const [body, setBody] = useState(\"\");\r\n const [status, setStoryStatus] = useState(\"public\");\r\n const [storyBgImage, setStoryBgImage] = useState(\"\");\r\n\r\n const dispatch = useDispatch();\r\n\r\n const storyCreate = useSelector((state) => state.storyCreate);\r\n const { loading, error, story } = storyCreate;\r\n\r\n const userSignin = useSelector((state) => state.userSignin);\r\n const { userInfo } = userSignin;\r\n\r\n const formRef = useRef();\r\n\r\n useEffect(() => {\r\n if (story) {\r\n setTimeout(() => {\r\n dispatch({ type: STORY_CREATE_RESET });\r\n props.history.push(\"/mystories\");\r\n }, 1000);\r\n }\r\n }, [dispatch, props.history, story]);\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n const fData = new FormData(formRef.current);\r\n\r\n dispatch(createStory(fData));\r\n e.target.reset();\r\n };\r\n\r\n return (\r\n <div className=\"container\">\r\n <div className=\"author-box\">\r\n <React.Fragment>\r\n <ProfileUpperbox\r\n username={userInfo.username}\r\n email={userInfo.email}\r\n profileImage={userInfo.profileImage}\r\n >\r\n {\"Write Story\"}\r\n </ProfileUpperbox>\r\n\r\n <form onSubmit={handleSubmit} ref={formRef}>\r\n {loading && <LoadingBox></LoadingBox>}\r\n {error && <MessageBox variant=\"danger\">{error}</MessageBox>}\r\n {story && (\r\n <MessageBox variant=\"success\">{story.message}</MessageBox>\r\n )}\r\n\r\n <div className=\"story-wrap-input\">\r\n <input\r\n className=\"story-input-100\"\r\n type=\"text\"\r\n name=\"title\"\r\n placeholder=\"title\"\r\n required\r\n minLength={3}\r\n value={title}\r\n onChange={(e) => setTitle(e.target.value)}\r\n />\r\n </div>\r\n\r\n <div className=\"story-wrap-input\">\r\n <textarea\r\n className=\"story-input-100 story-input-textarea\"\r\n placeholder=\"body\"\r\n name=\"body\"\r\n required\r\n minLength={3}\r\n value={body}\r\n onChange={(e) => setBody(e.target.value)}\r\n />\r\n </div>\r\n\r\n <div className=\"story-wrap-input\">\r\n <h3>Status</h3>\r\n\r\n <input\r\n className=\"story-radio\"\r\n type=\"radio\"\r\n name=\"status\"\r\n value=\"public\"\r\n checked={status === \"public\"}\r\n onChange={(e) => setStoryStatus(e.target.value)}\r\n />\r\n <label>Public</label>\r\n\r\n <input\r\n className=\"story-radio\"\r\n type=\"radio\"\r\n name=\"status\"\r\n value=\"private\"\r\n checked={status === \"private\"}\r\n onChange={(e) => setStoryStatus(e.target.value)}\r\n />\r\n <label>Private</label>\r\n </div>\r\n\r\n <div className=\"story-wrap-input\">\r\n <input\r\n type=\"file\"\r\n name=\"storyBgImage\"\r\n onChange={(e) => setStoryBgImage(e.target.files[0])}\r\n />\r\n </div>\r\n\r\n <div className=\"story-wrap-input\">\r\n <button className=\"story-submit-btn\" type=\"submit\">\r\n Post\r\n </button>\r\n </div>\r\n </form>\r\n </React.Fragment>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default WriteStoryScreen;\r\n","E:\\courses\\Mern\\Story\\client\\src\\Component\\StoryComponents\\ProfileUpperbox.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\Screens\\StoryUpdateScreen.jsx",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\reducers\\commentReducers.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actionConstants\\commentConstants.js",[],"E:\\courses\\Mern\\Story\\client\\src\\redux\\actions\\commentAction.js",[],"E:\\courses\\Mern\\Story\\client\\src\\Component\\utilityComponents\\Modal.jsx",[],["157","158"],{"ruleId":"159","replacedBy":"160"},{"ruleId":"161","replacedBy":"162"},{"ruleId":"159","replacedBy":"163"},{"ruleId":"161","replacedBy":"164"},{"ruleId":"165","severity":1,"message":"166","line":1,"column":17,"nodeType":"167","messageId":"168","endLine":1,"endColumn":25},{"ruleId":"165","severity":1,"message":"169","line":2,"column":24,"nodeType":"167","messageId":"168","endLine":2,"endColumn":35},{"ruleId":"165","severity":1,"message":"170","line":20,"column":10,"nodeType":"167","messageId":"168","endLine":20,"endColumn":22},{"ruleId":"165","severity":1,"message":"171","line":14,"column":10,"nodeType":"167","messageId":"168","endLine":14,"endColumn":22},{"ruleId":"159","replacedBy":"172"},{"ruleId":"161","replacedBy":"173"},"no-native-reassign",["174"],"no-negated-in-lhs",["175"],["174"],["175"],"no-unused-vars","'Fragment' is defined but never used.","Identifier","unusedVar","'FaCaretDown' is defined but never used.","'profileImage' is assigned a value but never used.","'storyBgImage' is assigned a value but never used.",["174"],["175"],"no-global-assign","no-unsafe-negation"]