-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintcache
1 lines (1 loc) · 24.4 KB
/
.eslintcache
1
[{"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\index.js":"1","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\state\\provider.js":"2","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\state\\reducer.js":"3","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\App.jsx":"4","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\env.js":"5","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\CartPage.jsx":"6","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\HomePage.jsx":"7","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\CategoriProduct.jsx":"8","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Login.jsx":"9","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Order.jsx":"10","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\OldordersDetails.jsx":"11","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\ProductDetails.jsx":"12","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Profile.jsx":"13","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Register.jsx":"14","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\NavBar.jsx":"15","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Oldorders.jsx":"16","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Product.jsx":"17"},{"size":360,"mtime":1608296261000,"results":"18","hashOfConfig":"19"},{"size":400,"mtime":1608296261000,"results":"20","hashOfConfig":"19"},{"size":1064,"mtime":1608296261000,"results":"21","hashOfConfig":"19"},{"size":3540,"mtime":1608296261000,"results":"22","hashOfConfig":"19"},{"size":487,"mtime":1634489295395,"results":"23","hashOfConfig":"19"},{"size":5756,"mtime":1608296261000,"results":"24","hashOfConfig":"19"},{"size":3632,"mtime":1608296261000,"results":"25","hashOfConfig":"19"},{"size":1250,"mtime":1608296261000,"results":"26","hashOfConfig":"19"},{"size":1525,"mtime":1608296261000,"results":"27","hashOfConfig":"19"},{"size":4050,"mtime":1608296261000,"results":"28","hashOfConfig":"19"},{"size":3014,"mtime":1608296261000,"results":"29","hashOfConfig":"19"},{"size":3224,"mtime":1608296261000,"results":"30","hashOfConfig":"19"},{"size":4386,"mtime":1608296261000,"results":"31","hashOfConfig":"19"},{"size":2071,"mtime":1608296261000,"results":"32","hashOfConfig":"19"},{"size":2153,"mtime":1608296261000,"results":"33","hashOfConfig":"19"},{"size":2885,"mtime":1608296261000,"results":"34","hashOfConfig":"19"},{"size":1756,"mtime":1608296261000,"results":"35","hashOfConfig":"19"},{"filePath":"36","messages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1cp9n8",{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"44"},{"filePath":"45","messages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"47","messages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"57","messages":"58","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"59"},{"filePath":"60","messages":"61","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"64"},{"filePath":"65","messages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"71"},{"filePath":"72","messages":"73","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"74"},"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\index.js",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\state\\provider.js",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\state\\reducer.js",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\App.jsx",["75","76","77","78"],"import Axios from 'axios'\nimport React, { useEffect } from 'react'\nimport { BrowserRouter, Switch, Route } from 'react-router-dom'\nimport CartPage from './components/CartPage'\nimport CategoriProduct from './components/CategoriProduct'\nimport HomePage from './components/HomePage'\nimport Login from './components/Login'\nimport NavBar from './components/NavBar'\nimport Oldorders from './components/Oldorders'\nimport OldordersDetails from './components/OldordersDetails'\nimport Order from './components/Order'\nimport ProductDetails from './components/ProductDetails'\nimport Profile from './components/Profile'\nimport Register from './components/Register'\nimport { domain } from './env'\nimport { useGlobalState } from './state/provider'\n\nconst App = () => {\n const [{ profile, reloadpage }, dispatch] = useGlobalState()\n const tokenget = window.localStorage.getItem('token')\n useEffect(() => {\n if (tokenget !== null) {\n const getdata = async () => {\n await Axios({\n method: \"get\",\n url: `${domain}/api/profile/`,\n headers: {\n Authorization: `token ${tokenget}`\n }\n }).then(res => {\n let user = res.data['data']\n // console.log(user)\n dispatch({\n type: \"ADD_PROFILE\",\n profile: user\n }\n )\n })\n .catch(e => {\n // console.log(e)\n dispatch({\n type: \"ADD_PROFILE\",\n profile: null\n })\n\n }\n )\n\n }\n getdata()\n }\n\n }, [reloadpage])\n useEffect(() => {\n if (profile !== null) {\n const getdata = async () => {\n await Axios({\n method: \"get\",\n url: `${domain}/api/cart/`,\n headers: {\n Authorization: `token ${tokenget}`\n }\n }).then(res => {\n // console.log(res.data);\n {\n const all_data = []\n res?.data.map(data => {\n if (data.complit) {\n all_data.push(data)\n dispatch({\n type: \"ADD_CARTPRODUCT_COMPLIT\",\n cartproduct_complit: all_data\n })\n // console.log(true);\n }\n else {\n dispatch({\n type: \"ADD_CARTPRODUCT_UNCOMPLIT\",\n cartproductf_uncomplit: data\n })\n // console.log(false)\n }\n })\n }\n })\n }\n getdata()\n }\n }, [reloadpage])\n return (\n <BrowserRouter>\n <NavBar />\n <Switch>\n <Route exact path='/' component={HomePage} />\n <Route exact path='/product/:id' component={ProductDetails} />\n <Route exact path='/categori/:id' component={CategoriProduct} />\n {\n profile !== null ? (\n <>\n <Route exact path='/profile' component={Profile} />\n <Route exact path='/cart' component={CartPage} />\n <Route exact path='/order' component={Order} />\n <Route exact path='/oldorders' component={Oldorders} />\n <Route exact path='/oldorders/:id' component={OldordersDetails} />\n </>\n ) :\n (\n <>\n <Route exact path='/login' component={Login} />\n <Route exact path='/register' component={Register} />\n </>\n )\n }\n <Route exact component={HomePage} />\n </Switch>\n </BrowserRouter>\n\n )\n}\n\n\nexport default App\n","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\env.js",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\CartPage.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\HomePage.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\CategoriProduct.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Login.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Order.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\OldordersDetails.jsx",["79"],"import Axios from 'axios';\nimport React, { useEffect, useState } from 'react'\nimport { useParams } from 'react-router-dom';\nimport { domain } from '../env';\n\nconst OldordersDetails = () => {\n const tokenget = window.localStorage.getItem('token')\n const { id } = useParams()\n const [details, setDetails] = useState(null);\n useEffect(() => {\n const getdata = async () => {\n await Axios({\n method: \"get\",\n url: `${domain}/api/orders/${id}/`,\n headers: {\n Authorization: `token ${tokenget}`\n }\n }).then((res) => {\n // console.log(res.data);\n console.log(res?.data.data[0]);\n setDetails(res?.data?.data[0])\n })\n }\n getdata()\n }, [])\n const products = details?.cartproduct\n return (\n <div className=\"container p-3\">\n <table className=\"table table-bordered \">\n <thead>\n <tr>\n <th>Date</th>\n <th>Total</th>\n <th>Email</th>\n <th>Mobile</th>\n <th>discount</th>\n <th>Products</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n {\n details != null && (\n <>\n <td>{details.date}</td>\n <td>{details.total}</td>\n <td>{details.email}</td>\n <td>{details.mobile}</td>\n <td>{details.discount}</td>\n <td>{details.cartproduct?.length}</td>\n </>\n )\n }\n </tr>\n </tbody>\n </table>\n <h1>Product details</h1>\n <table className=\"table table-bordered \">\n <thead>\n <tr>\n <th>SN</th>\n <th>Product</th>\n <th>Price</th>\n <th>Quantity</th>\n <th>Subtotal</th>\n </tr>\n </thead>\n <tbody>\n {\n products?.map((data, i) => (\n <tr key={i}>\n <td>{i + 1}</td>\n <td>{data.product[0].title}</td>\n <td>{data.price}</td>\n <td>{data.quantity}</td>\n <td>{data.subtotal}</td>\n </tr>\n ))\n }\n </tbody>\n </table>\n </div>\n )\n}\n\nexport default OldordersDetails\n","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\ProductDetails.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Profile.jsx",["80"],"import Axios from 'axios'\nimport React, { useState } from 'react'\nimport { domain } from '../env'\nimport { useGlobalState } from '../state/provider'\n\nconst Profile = () => {\n const [{ profile }, dispatch] = useGlobalState()\n // console.log(profile.prouser);\n const [image, setImage] = useState(null)\n const [firstname, setFirstname] = useState(profile?.prouser.first_name)\n const [lasename, setLasename] = useState(profile?.prouser.last_name)\n const [email, setemail] = useState(profile?.prouser.email)\n const uploadimage = async () => {\n const formdata = new FormData()\n formdata.append('image', image)\n await Axios({\n method: \"post\",\n url: `${domain}/api/updateprofile/`,\n headers: {\n Authorization: `token ${window.localStorage.getItem('token')}`\n },\n data: formdata\n }).then(response => {\n // console.log(response.data[\"message\"]);\n dispatch({\n type: \"ADD_RELOADPAGE_DATA\",\n reloadpage: response.data\n })\n alert(response.data[\"message\"])\n })\n\n }\n const updatedata = async () => {\n await Axios({\n method: \"post\",\n url: `${domain}/api/updateuser/`,\n headers: {\n Authorization: `token ${window.localStorage.getItem('token')}`\n },\n data: {\n \"first_name\": firstname,\n \"last_name\": lasename,\n \"email\": email\n }\n }).then(response => {\n // console.log(response.data[\"message\"]);\n dispatch({\n type: \"ADD_RELOADPAGE_DATA\",\n reloadpage: response.data\n })\n alert(response.data[\"message\"])\n })\n\n }\n return (\n <div className=\"container\">\n <div class=\"content-section\">\n <div class=\"media\">\n <img class=\"rounded-circle account-img\" src={`${domain}${profile?.image}`} />\n <div class=\"media-body\">\n <h2 class=\"account-heading\">{profile?.prouser.username}</h2>\n <small class=\"form-text text-muted\">Username name is Fiexd</small>\n <p class=\"text-secondary\">{profile?.prouser.email}</p>\n <p>{profile?.prouser.first_name} {profile?.prouser.last_name}</p>\n </div>\n </div>\n <form method=\"POST\" enctype=\"multipart/form-data\">\n <fieldset class=\"form-group\">\n <legend class=\"border-bottom mb-4\">Profile Info</legend>\n <div class=\"form-group\">\n <label>Uplode Profile Picture</label>\n <div class=\"row\">\n <div class=\"col\">\n <input onChange={(e) => setImage(e.target.files[0])} type=\"file\" class=\"form-control\" />\n </div>\n <div class=\"col\">\n <p onClick={uploadimage} className=\"btn btn-info\">Upload</p>\n </div>\n </div>\n </div>\n <div class=\"form-group\">\n <label>First Name</label>\n <input type=\"text\" class=\"form-control\" onChange={(e) => setFirstname(e.target.value)} value={firstname} />\n </div>\n <div class=\"form-group\">\n <label>Last Name</label>\n <input type=\"text\" class=\"form-control\" onChange={(e) => setLasename(e.target.value)} value={lasename} />\n </div>\n <div class=\"form-group\">\n <label>Email</label>\n <input type=\"email\" class=\"form-control\" onChange={(e) => setemail(e.target.value)} value={email} />\n </div>\n </fieldset>\n <div class=\"form-group\">\n <p class=\"btn btn-outline-info\" onClick={updatedata}>Update</p>\n </div>\n </form>\n </div>\n </div>\n )\n}\n\nexport default Profile\n","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Register.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\NavBar.jsx",[],"B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Oldorders.jsx",["81"],"import Axios from 'axios'\nimport React, { useEffect, useState } from 'react'\nimport { Link } from 'react-router-dom'\nimport { domain } from '../env'\n\nconst Oldorders = () => {\n const tokenget = window.localStorage.getItem('token')\n const [orders, setOrders] = useState(null)\n // console.log(orders);\n const [reload, setReload] = useState(null);\n useEffect(() => {\n const getorder = async () => {\n await Axios({\n method: 'get',\n url: `${domain}/api/orders/`,\n headers: {\n Authorization: `token ${tokenget}`\n }\n }).then(response => {\n // console.log(response.data);\n setOrders(response.data)\n })\n }\n getorder()\n }, [reload])\n const delateorderhistory = async (id) => {\n await Axios({\n method: \"delete\",\n url: `${domain}/api/orders/${id}/`,\n headers: {\n Authorization: `token ${tokenget}`\n }\n }).then((res) => {\n // console.log(res.data);\n setReload(res.data)\n })\n }\n return (\n <div className=\"container\">\n <h1>Orders History</h1>\n <table className=\"table\">\n <thead>\n <tr>\n <th>SN</th>\n <th>Totla</th>\n <th>Product</th>\n <th>Order Status</th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {\n orders?.length !== 0 ?\n orders?.map((order, i) => (\n <tr key={i}>\n <td>{i + 1}</td>\n <td>TK. {order?.total}</td>\n <td>{order?.cartproduct?.length}</td>\n <td>{order?.order_status}</td>\n <td><Link to={`/oldorders/${order.id}`} className=\"btn btn-success\">Details</Link></td>\n <td><p onClick={() => delateorderhistory(order.id)} className=\"btn btn-danger\">Delate</p></td>\n </tr>\n )) :\n (\n <div>\n <h1 className=\"display-1\">\n No Old Order\n </h1>\n <Link to=\"/\" className=\"btn btn-info\">GO HOME</Link>\n </div>\n )\n }\n </tbody>\n </table>\n </div>\n )\n}\n\nexport default Oldorders\n","B:\\7th Sem\\ADF\\Project\\Ecommerce\\src\\components\\Product.jsx",["82"],"import Axios from 'axios'\nimport React from 'react'\nimport { Link, useHistory } from 'react-router-dom'\nimport { domain } from '../env'\nimport { useGlobalState } from '../state/provider'\n\nconst Product = ({ item }) => {\n const [{ profile }, dispatch] = useGlobalState()\n\n const history = useHistory()\n\n const addtocart = async (id) => {\n profile !== null ? (\n await Axios({\n method: 'post',\n url: `${domain}/api/addtocart/`,\n headers: {\n Authorization: `token ${window.localStorage.getItem('token')}`\n },\n data: { \"id\": id }\n }).then(response => {\n // console.log(response);\n dispatch({\n type: \"ADD_RELOADPAGE_DATA\",\n reloadpage: response\n })\n })\n ) : (\n history.push(\"/login\")\n )\n\n }\n return (\n <div class=\"card single_product\" >\n <Link to={`/product/${item.id}`} className=\"product_image\">\n <img class=\"card-img-top\" src={item.image} alt=\"Card image cap\" />\n </Link>\n <div class=\"card-body\">\n <h5 class=\"card-title\">{item.title}</h5>\n <p class=\"card-text\">\n {(item.description).substring(0, 50)}... <Link to={`/product/${item.id}`}> Read more</Link>\n </p>\n <Link onClick={() => addtocart(item.id)} class=\"btn btn-primary\">Add to Cart</Link>\n </div>\n <div className=\"card-footer\">\n <h5>Price: <del>{item.marcket_price}$</del> {item.selling_price}$</h5>\n </div>\n </div>\n )\n}\n\nexport default Product\n",{"ruleId":"83","severity":1,"message":"84","line":53,"column":6,"nodeType":"85","endLine":53,"endColumn":18,"suggestions":"86"},{"ruleId":"87","severity":1,"message":"88","line":65,"column":11,"nodeType":"89","messageId":"90","endLine":84,"endColumn":12},{"ruleId":"91","severity":1,"message":"92","line":67,"column":32,"nodeType":"93","messageId":"94","endLine":67,"endColumn":34},{"ruleId":"83","severity":1,"message":"95","line":89,"column":6,"nodeType":"85","endLine":89,"endColumn":18,"suggestions":"96"},{"ruleId":"83","severity":1,"message":"97","line":25,"column":8,"nodeType":"85","endLine":25,"endColumn":10,"suggestions":"98"},{"ruleId":"99","severity":1,"message":"100","line":59,"column":21,"nodeType":"101","endLine":59,"endColumn":98},{"ruleId":"83","severity":1,"message":"102","line":25,"column":8,"nodeType":"85","endLine":25,"endColumn":16,"suggestions":"103"},{"ruleId":"104","severity":1,"message":"105","line":36,"column":17,"nodeType":"101","endLine":36,"endColumn":83},"react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'dispatch' and 'tokenget'. Either include them or remove the dependency array.","ArrayExpression",["106"],"no-lone-blocks","Nested block is redundant.","BlockStatement","redundantNestedBlock","array-callback-return","Array.prototype.map() expects a return value from arrow function.","ArrowFunctionExpression","expectedInside","React Hook useEffect has missing dependencies: 'dispatch', 'profile', and 'tokenget'. Either include them or remove the dependency array.",["107"],"React Hook useEffect has missing dependencies: 'id' and 'tokenget'. Either include them or remove the dependency array.",["108"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","React Hook useEffect has a missing dependency: 'tokenget'. Either include it or remove the dependency array.",["109"],"jsx-a11y/img-redundant-alt","Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop.",{"desc":"110","fix":"111"},{"desc":"112","fix":"113"},{"desc":"114","fix":"115"},{"desc":"116","fix":"117"},"Update the dependencies array to be: [dispatch, reloadpage, tokenget]",{"range":"118","text":"119"},"Update the dependencies array to be: [dispatch, profile, reloadpage, tokenget]",{"range":"120","text":"121"},"Update the dependencies array to be: [id, tokenget]",{"range":"122","text":"123"},"Update the dependencies array to be: [reload, tokenget]",{"range":"124","text":"125"},[1552,1564],"[dispatch, reloadpage, tokenget]",[2519,2531],"[dispatch, profile, reloadpage, tokenget]",[817,819],"[id, tokenget]",[794,802],"[reload, tokenget]"]