-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintcache
More file actions
1 lines (1 loc) · 5.53 KB
/
.eslintcache
File metadata and controls
1 lines (1 loc) · 5.53 KB
1
[{"C:\\Users\\pc\\react\\api\\src\\index.js":"1","C:\\Users\\pc\\react\\api\\src\\App.js":"2","C:\\Users\\pc\\react\\api\\src\\registerServiceWorker.js":"3","C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\Blog.js":"4","C:\\Users\\pc\\react\\api\\src\\components\\Post\\Post.js":"5","C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\Posts\\Posts.js":"6","C:\\Users\\pc\\react\\api\\src\\axios.js":"7","C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\NewPost\\NewPost.js":"8","C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\FullPost\\FullPost.js":"9","C:\\Users\\pc\\react\\api\\src\\hoc\\asyncComponent.js":"10"},{"size":258,"mtime":1508424894000,"results":"11","hashOfConfig":"12"},{"size":498,"mtime":1613117469712,"results":"13","hashOfConfig":"12"},{"size":4022,"mtime":1508423394000,"results":"14","hashOfConfig":"12"},{"size":2413,"mtime":1613115168318,"results":"15","hashOfConfig":"12"},{"size":374,"mtime":1610436193267,"results":"16","hashOfConfig":"12"},{"size":1769,"mtime":1610436291917,"results":"17","hashOfConfig":"12"},{"size":225,"mtime":1610295410980,"results":"18","hashOfConfig":"12"},{"size":1941,"mtime":1610439501012,"results":"19","hashOfConfig":"12"},{"size":1761,"mtime":1610436919441,"results":"20","hashOfConfig":"12"},{"size":583,"mtime":1613112394734,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},"1bhh9z6",{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"39","usedDeprecatedRules":"24"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\pc\\react\\api\\src\\index.js",[],["44","45"],"C:\\Users\\pc\\react\\api\\src\\App.js",[],"C:\\Users\\pc\\react\\api\\src\\registerServiceWorker.js",[],"C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\Blog.js",[],"C:\\Users\\pc\\react\\api\\src\\components\\Post\\Post.js",[],"C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\Posts\\Posts.js",[],"C:\\Users\\pc\\react\\api\\src\\axios.js",[],"C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\NewPost\\NewPost.js",["46"],"import React, { Component } from 'react';\nimport axios from 'axios';\nimport './NewPost.css';\nimport { Redirect } from 'react-router-dom';\nclass NewPost extends Component {\n state = {\n title: '',\n content: '',\n author: 'Fatih',\n submitted: false\n }\n postDataHandler = () => {\n const data = {\n title: this.state.title,\n body: this.state.content,\n author: this.state.author\n }\n axios.post('https://jsonplaceholder.typicode.com/posts', data)\n .then(response => {\n console.log(response);\n this.props.history.replace('/posts');//instead of replace we can use push but if we use push, after the redirect \n //we can go back to earlier page simply clicing to the browser's go back arrow button\n // this.setState({submitted: true})\n });\n }\n \n render() {\n /* let redirect = null;\n if(this.state.submitted){\n redirect= <Redirect to=\"/posts\"/>\n } */\n return (\n <div className=\"NewPost\">\n {/* {redirect} */}\n <h1>Add a Post</h1>\n <label>Title</label>\n <input type=\"text\" value={this.state.title} onChange={(event) => this.setState({ title: event.target.value })} />\n <label>Content</label>\n <textarea rows=\"4\" value={this.state.content} onChange={(event) => this.setState({ content: event.target.value })} />\n <label>Author</label>\n <select value={this.state.author} onChange={(event) => this.setState({ author: event.target.value })}>\n <option value=\"Fatih\">Fatih</option>\n <option value=\"Salih\">Salih</option>\n </select>\n <button onClick={this.postDataHandler}>Add Post</button>\n </div>\n );\n }\n}\n\nexport default NewPost;","C:\\Users\\pc\\react\\api\\src\\containers\\Blog\\FullPost\\FullPost.js",[],"C:\\Users\\pc\\react\\api\\src\\hoc\\asyncComponent.js",[],{"ruleId":"47","replacedBy":"48"},{"ruleId":"49","replacedBy":"50"},{"ruleId":"51","severity":1,"message":"52","line":4,"column":10,"nodeType":"53","messageId":"54","endLine":4,"endColumn":18},"no-native-reassign",["55"],"no-negated-in-lhs",["56"],"no-unused-vars","'Redirect' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation"]