/
.eslintcache~f50a16dfa9074a443dea41e1aaba1f080abd3290
2 lines (1 loc) · 13.2 KB
/
.eslintcache~f50a16dfa9074a443dea41e1aaba1f080abd3290
1
[{"C:\\Final Project\\learning-platform-frontend\\src\\index.js":"1","C:\\Final Project\\learning-platform-frontend\\src\\reportWebVitals.js":"2","C:\\Final Project\\learning-platform-frontend\\src\\App.js":"3","C:\\Final Project\\learning-platform-frontend\\src\\constants\\theme.js":"4","C:\\Final Project\\learning-platform-frontend\\src\\containers\\Routes.js":"5","C:\\Final Project\\learning-platform-frontend\\src\\components\\Footer\\index.js":"6","C:\\Final Project\\learning-platform-frontend\\src\\components\\Header\\index.js":"7","C:\\Final Project\\learning-platform-frontend\\src\\components\\Footer\\Footer.js":"8","C:\\Final Project\\learning-platform-frontend\\src\\components\\Header\\Header.js":"9","C:\\Final Project\\learning-platform-frontend\\src\\components\\Cart\\index.js":"10","C:\\Final Project\\learning-platform-frontend\\src\\components\\Cart\\Cart.js":"11","C:\\Final Project\\learning-platform-frontend\\src\\redux\\store.js":"12","C:\\Final Project\\learning-platform-frontend\\src\\redux\\reducers\\cartReducer.js":"13","C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseList\\index.js":"14","C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseList\\CourseList.js":"15","C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseCard\\CourseCard.js":"16","C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseCard\\index.js":"17","C:\\Final Project\\learning-platform-frontend\\src\\constants\\breakpoint.js":"18"},{"size":777,"mtime":1608027228640,"results":"19","hashOfConfig":"20"},{"size":362,"mtime":1607996717052,"results":"21","hashOfConfig":"20"},{"size":721,"mtime":1608028195192,"results":"22","hashOfConfig":"20"},{"size":304,"mtime":1608012714381,"results":"23","hashOfConfig":"20"},{"size":977,"mtime":1608024488420,"results":"24","hashOfConfig":"20"},{"size":36,"mtime":1608012714353,"results":"25","hashOfConfig":"20"},{"size":36,"mtime":1608012714377,"results":"26","hashOfConfig":"20"},{"size":1246,"mtime":1608025923375,"results":"27","hashOfConfig":"20"},{"size":2889,"mtime":1608026928691,"results":"28","hashOfConfig":"20"},{"size":34,"mtime":1607925855302,"results":"29","hashOfConfig":"20"},{"size":2942,"mtime":1608026516382,"results":"30","hashOfConfig":"20"},{"size":187,"mtime":1607931273286,"results":"31","hashOfConfig":"20"},{"size":745,"mtime":1608028170490,"results":"32","hashOfConfig":"20"},{"size":40,"mtime":1607926846165,"results":"33","hashOfConfig":"20"},{"size":1802,"mtime":1608028262311,"results":"34","hashOfConfig":"20"},{"size":932,"mtime":1608024366086,"results":"35","hashOfConfig":"20"},{"size":40,"mtime":1607997672974,"results":"36","hashOfConfig":"20"},{"size":301,"mtime":1606383191366,"results":"37","hashOfConfig":"20"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"invy9e",{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"55","usedDeprecatedRules":"42"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"42"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"71","messages":"72","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"73","usedDeprecatedRules":"42"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},"C:\\Final Project\\learning-platform-frontend\\src\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\reportWebVitals.js",[],["78","79"],"C:\\Final Project\\learning-platform-frontend\\src\\App.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\constants\\theme.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\containers\\Routes.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\Footer\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\Header\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\Footer\\Footer.js",["80"],"import React from 'react';\nimport styled from 'styled-components';\nimport { Row, Col } from 'antd';\nimport { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\n\nconst FooterContainer = styled.div`\n text-align: center;\n padding: 12px 24px;\n background: ${(props) => props.theme.colors.primary.light};\n color: ${(props) => props.theme.colors.primary.text};\n`\n\nexport default function Footer() {\n const themeContext = useContext(ThemeContext);\n \n return (\n <FooterContainer>\n <Row gutter={[0, { sm: 24, md: 0}]}>\n <Col xs={12} md={6}>\n <h3><strong>關於</strong></h3>\n <div>關於我們</div>\n <div>加入我們</div>\n <div>服務條款</div>\n </Col>\n <Col xs={12} md={6}>\n <h3><strong>追蹤動態</strong></h3>\n <div>Facebook</div>\n <div>Instagram</div>\n <div>Youtube</div>\n </Col>\n <Col\n xs={24} md={12}\n style={{\n fontSize: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <div>Teach Table © All Rights Reserved.</div>\n </Col>\n </Row>\n </FooterContainer>\n );\n}\n","C:\\Final Project\\learning-platform-frontend\\src\\components\\Header\\Header.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\Cart\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\Cart\\Cart.js",["81","82","83","84"],"import React from 'react';\nimport styled from 'styled-components';\nimport { useContext } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { setList, selectList } from '../../redux/reducers/cartReducer';\nimport { ThemeContext } from 'styled-components';\nimport { Table } from 'antd';\nimport { StarOutlined, DeleteOutlined } from '@ant-design/icons';\n\nconst MainWrapper = styled.div`\n display: flex;\n position: relative;\n`;\nconst LeftContainer = styled.div`\n flex: 1 1 0%;\n margin-right: 36px;\n`;\nconst RightContainerOuter = styled.div`\n flex: 0 1 250px;\n`;\nconst RightContainerInner = styled.div`\n width: 300px;\n position: fixed;\n right: 20px;\n padding: 24px 12px;\n background: ${(props) => props.theme.colors.secondary.main};\n`;\n\nexport default function Cart() {\n const cartList = useSelector(selectList);\n let sumPrice = 0;\n cartList.forEach((el) => {\n sumPrice += el.price;\n });\n\n const handleAddToFavorite = (id) => {\n console.log('handleAddToFavorite id', id);\n };\n\n const handleDeleteFromCart = (id) => {\n console.log('handleDeleteFromCart id', id);\n };\n\n const columns = [\n { title: '課程ID', dataIndex: 'key', key: 'key' },\n { title: '課程名稱', dataIndex: 'title', key: 'title' },\n { title: '售價', dataIndex: 'price', key: 'price' },\n {\n title: '操作',\n dataIndex: '',\n key: 'x',\n render: (text, record) => (\n <>\n <div>購買單堂</div>\n <StarOutlined\n style={{ fontSize: '24px' }}\n onClick={() => handleAddToFavorite(record.id)}\n />\n ,\n <DeleteOutlined\n style={{ fontSize: '24px' }}\n onClick={() => handleDeleteFromCart(record.id)}\n />\n </>\n ),\n },\n ];\n\n return (\n <MainWrapper>\n <LeftContainer>\n <h1>購物車清單</h1>\n <h3>共有{cartList.length}堂課</h3>\n <hr />\n {cartList.length === 0 && (\n <>\n <center>\n <h1>購物車是空的,看看課程?</h1>\n <h1><Link to=\"/\">探索課程</Link></h1>\n </center>\n </>\n )}\n {cartList.length > 0 && (\n <Table\n columns={columns}\n expandable={{\n expandedRowRender: (record) => (\n <p style={{ margin: 0 }}>{record.description}</p>\n ),\n rowExpandable: (record) => record.name !== 'Not Expandable',\n }}\n dataSource={cartList}\n />\n )}\n </LeftContainer>\n <RightContainerOuter>\n <RightContainerInner>\n <h5>訂單明細</h5>\n <hr />\n <div>小計 NT$ {sumPrice}</div>\n <br></br>\n <button size=\"lg\" block>\n 結帳\n </button>\n </RightContainerInner>\n </RightContainerOuter>\n </MainWrapper>\n );\n}\n","C:\\Final Project\\learning-platform-frontend\\src\\redux\\store.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\redux\\reducers\\cartReducer.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseList\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseList\\CourseList.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseCard\\CourseCard.js",["85","86"],"import React from 'react';\nimport { Card, Avatar, Progress } from 'antd';\nimport { StarOutlined, ShoppingCartOutlined } from '@ant-design/icons';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { setList, selectList } from '../../redux/reducers/cartReducer';\nconst { Meta } = Card;\n\nexport default function CourseCard({ courseInfo }) {\n const dispatch = useDispatch();\n\n const handleClickAddToCart = () => {\n dispatch(setList(courseInfo));\n };\n\n return (\n <Card\n cover={<img alt=\"example\" src={courseInfo.imgUrl} />}\n actions={[\n <StarOutlined key=\"star\" />,\n <ShoppingCartOutlined key=\"shopping\" onClick={handleClickAddToCart} />,\n ]}\n >\n <Progress percent={20} />\n <Meta\n avatar={<Avatar src={courseInfo.imgUrl} />}\n title={courseInfo.title}\n description={courseInfo.description}\n style={{ marginTop: 16 }}\n />\n </Card>\n );\n}\n","C:\\Final Project\\learning-platform-frontend\\src\\components\\CourseCard\\index.js",[],"C:\\Final Project\\learning-platform-frontend\\src\\constants\\breakpoint.js",[],{"ruleId":"87","replacedBy":"88"},{"ruleId":"89","replacedBy":"90"},{"ruleId":"91","severity":1,"message":"92","line":15,"column":9,"nodeType":"93","messageId":"94","endLine":15,"endColumn":21},{"ruleId":"91","severity":1,"message":"95","line":3,"column":10,"nodeType":"93","messageId":"94","endLine":3,"endColumn":20},{"ruleId":"91","severity":1,"message":"96","line":4,"column":10,"nodeType":"93","messageId":"94","endLine":4,"endColumn":21},{"ruleId":"91","severity":1,"message":"97","line":6,"column":10,"nodeType":"93","messageId":"94","endLine":6,"endColumn":17},{"ruleId":"91","severity":1,"message":"98","line":7,"column":10,"nodeType":"93","messageId":"94","endLine":7,"endColumn":22},{"ruleId":"91","severity":1,"message":"99","line":4,"column":23,"nodeType":"93","messageId":"94","endLine":4,"endColumn":34},{"ruleId":"91","severity":1,"message":"100","line":5,"column":19,"nodeType":"93","messageId":"94","endLine":5,"endColumn":29},"no-native-reassign",["101"],"no-negated-in-lhs",["102"],"no-unused-vars","'themeContext' is assigned a value but never used.","Identifier","unusedVar","'useContext' is defined but never used.","'useDispatch' is defined but never used.","'setList' is defined but never used.","'ThemeContext' is defined but never used.","'useSelector' is defined but never used.","'selectList' is defined but never used.","no-global-assign","no-unsafe-negation"]