-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 5.91 KB
/
.eslintcache
1
[{"/home/krishnam/Desktop/blog-post/src/App.js":"1","/home/krishnam/Desktop/blog-post/src/Drawer.js":"2","/home/krishnam/Desktop/blog-post/src/AddBlog.js":"3","/home/krishnam/Desktop/blog-post/src/Feeds.js":"4","/home/krishnam/Desktop/blog-post/src/FeedCard.js":"5","/home/krishnam/Desktop/blog-post/src/reportWebVitals.js":"6"},{"size":199,"mtime":1606557583872,"results":"7","hashOfConfig":"8"},{"size":2107,"mtime":1606565479322,"results":"9","hashOfConfig":"8"},{"size":2796,"mtime":1606570630559,"results":"10","hashOfConfig":"8"},{"size":1482,"mtime":1606571112015,"results":"11","hashOfConfig":"8"},{"size":2307,"mtime":1606626309874,"results":"12","hashOfConfig":"8"},{"size":362,"mtime":1606556323051,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"15l1qdd",{"filePath":"16","messages":"17","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"18","messages":"19","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"20"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/krishnam/Desktop/blog-post/src/App.js",["27"],"/home/krishnam/Desktop/blog-post/src/Drawer.js",["28"],"/home/krishnam/Desktop/blog-post/src/AddBlog.js",["29"],"import React, { useEffect, useState } from 'react'\nimport { TextField, Button, Typography } from '@material-ui/core';\nimport Snackbar from '@material-ui/core/Snackbar';\n\n\nfunction AddBlog() {\n\n const [title, setTitle] = useState(\"\");\n const [publisher, setPublisher] = useState(\"\");\n const [text, setText] = useState(\"\");\n const [success, setSuccess] = useState(false);\n\n const postBlog = () => {\n const requestOptions = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ title: title, publisher: publisher, text: text })\n };\n fetch('https://cfsession.herokuapp.com/blogs', requestOptions)\n .then(response => response.json());\n setSuccess(true)\n setTitle('')\n setPublisher('')\n setText('')\n setTimeout(() => setSuccess(false), 2000)\n }\n\n const handleTitle = (event) => {\n setTitle(event.target.value)\n }\n const handlePublisher = (event) => {\n setPublisher(event.target.value)\n }\n const handleText = (event) => {\n setText(event.target.value)\n }\n\n return (\n <div>\n <Typography variant=\"h3\" gutterBottom style={{ fontSize: '24px', fontStyle: 'italics' }}>\n Add Blog\n </Typography>\n <form noValidate\n autoComplete=\"off\"\n style={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}\n >\n <div style={{ margin: '10px' }} />\n <TextField id=\"outlined-basic\" style={{ width: '800px' }} value={title} label=\"Title\" variant=\"outlined\" onChange={handleTitle} />\n\n <div style={{ margin: '10px' }} />\n <TextField id=\"outlined-basic\" style={{ width: '800px' }} value={publisher} label=\"Publisher\" variant=\"outlined\" onChange={handlePublisher} />\n\n <div style={{ margin: '10px' }} />\n <TextField id=\"outlined-basic\" style={{ width: '800px' }} value={text} label=\"Article\" multiline\n rows={4} variant=\"outlined\" onChange={handleText} />\n\n <div style={{ margin: '10px' }} />\n\n <Button variant=\"contained\" color=\"primary\" disabled={(title.length < 1) || (text.length < 1) || (publisher.length < 1)}\n onClick={postBlog}\n >\n Post\n </Button>\n </form>\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left',\n }}\n open={success}\n autoHideDuration={2000}\n message=\"Blog posted successfully!\"\n />\n </div>\n )\n}\n\nexport default AddBlog;","/home/krishnam/Desktop/blog-post/src/Feeds.js",[],"/home/krishnam/Desktop/blog-post/src/FeedCard.js",["30","31","32","33","34"],"/home/krishnam/Desktop/blog-post/src/reportWebVitals.js",[],{"ruleId":"35","severity":1,"message":"36","line":2,"column":8,"nodeType":"37","messageId":"38","endLine":2,"endColumn":15},{"ruleId":"39","severity":1,"message":"40","line":74,"column":18,"nodeType":"41","messageId":"42","endLine":74,"endColumn":20},{"ruleId":"35","severity":1,"message":"43","line":1,"column":17,"nodeType":"37","messageId":"38","endLine":1,"endColumn":26},{"ruleId":"35","severity":1,"message":"43","line":1,"column":26,"nodeType":"37","messageId":"38","endLine":1,"endColumn":35},{"ruleId":"35","severity":1,"message":"44","line":37,"column":11,"nodeType":"37","messageId":"38","endLine":37,"endColumn":15},{"ruleId":"39","severity":1,"message":"40","line":38,"column":19,"nodeType":"41","messageId":"42","endLine":38,"endColumn":21},{"ruleId":"39","severity":1,"message":"40","line":45,"column":19,"nodeType":"41","messageId":"42","endLine":45,"endColumn":21},{"ruleId":"35","severity":1,"message":"45","line":52,"column":9,"nodeType":"37","messageId":"38","endLine":52,"endColumn":13},"no-unused-vars","'AddBlog' is defined but never used.","Identifier","unusedVar","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'useEffect' is defined but never used.","'data' is assigned a value but never used.","'bull' is assigned a value but never used."]