SHANKARA-CODERS / NestONDC

https://e-commerce-website-rho-six.vercel.app
0 stars 5 forks source link

feat: modified add to cart function #11

Closed RickDeb2004 closed 8 months ago

RickDeb2004 commented 8 months ago

close: #10

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

MAVRICK-1 commented 8 months ago

@RickDeb2004 Failed to compile.

Module not found: Error: You attempted to import ../../App which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/. WARNING in [eslint] src/App.js Line 10:8: 'About' is defined but never used no-unused-vars Line 26:10: 'productData' is assigned a value but never used no-unused-vars Line 29:23: 'setWindowWidth' is assigned a value but never used no-unused-vars Line 55:9: 'getData' is assigned a value but never used no-unused-vars Line 76:9: 'getCartData' is assigned a value but never used no-unused-vars Line 149:55: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/Sidebar/index.js Line 2:8: 'Slider' is defined but never used no-unused-vars Line 3:8: 'Checkbox' is defined but never used no-unused-vars Line 11:8: 'FormControl' is defined but never used no-unused-vars Line 12:8: 'FormLabel' is defined but never used no-unused-vars Line 19:10: 'valuetext' is defined but never used no-unused-vars Line 22:7: 'label' is assigned a value but never used no-unused-vars Line 26:12: 'value2' is assigned a value but never used no-unused-vars Line 44:38: Array.prototype.map() expects a return value from arrow function array-callback-return Line 46:44: Array.prototype.map() expects a return value from arrow function array-callback-return Line 50:29: Assignments to the 'catLength' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect react-hooks/exhaustive-deps Line 62:18: Assignments to the 'brands' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect react-hooks/exhaustive-deps Line 63:17: Assignments to the 'ratings' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect react-hooks/exhaustive-deps Line 65:45: Array.prototype.map() expects a return value from arrow function array-callback-return Line 84:52: Array.prototype.map() expects a return value from arrow function array-callback-return Line 112:8: React Hook useEffect has a missing dependency: 'filterByPrice'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 130:67: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 211:17: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/banners/index.js Line 15:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 21:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 27:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/catSlider/index.js Line 9:21: 'setAllData' is assigned a value but never used no-unused-vars Line 13:20: 'setItemBg' is assigned a value but never used no-unused-vars Line 54:39: Array.prototype.map() expects a return value from arrow function array-callback-return Line 56:44: Array.prototype.map() expects a return value from arrow function array-callback-return Line 60:29: Assignments to the 'catLength' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect react-hooks/exhaustive-deps Line 85:49: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/footer/footer.js Line 41:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 53:43: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 63:43: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 73:43: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 84:43: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 95:43: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 112:46: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 190:51: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 191:51: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 197:33: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/header/header.js Line 28:8: 'FmdGoodOutlinedIcon' is defined but never used no-unused-vars Line 38:25: 'setWindowWidth' is assigned a value but never used no-unused-vars Line 52:24: 'setcategories' is assigned a value but never used no-unused-vars Line 74:8: React Hook useEffect has a missing dependency: 'getCountry'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 81:53: Array.prototype.map() expects a return value from arrow function array-callback-return Line 141:46: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 152:73: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 209:53: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 216:53: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 223:73: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 237:61: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 294:77: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 295:77: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/header/nav/nav.js Line 16:25: 'setWindowWidth' is assigned a value but never used no-unused-vars Line 26:8: React Hook useEffect has a missing dependency: 'props.data'. Either include it or remove the dependency array. If 'setNavData' needs the current value of 'props.data', you can also switch to useReducer instead of useState and read 'props.data' in the reducer react-hooks/exhaustive-deps Line 137:53: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/components/product/index.js Line 51:33: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 57:41: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 62:41: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 67:41: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid

src/components/quantityBox/index.js Line 11:12: 'cartItems' is assigned a value but never used no-unused-vars

src/components/selectDrop/select.js Line 1:17: 'useEffect' is defined but never used no-unused-vars Line 5:10: 'FamilyRestroomTwoTone' is defined but never used no-unused-vars Line 15:23: 'setListData2' is assigned a value but never used no-unused-vars

src/firebase.js Line 2:8: 'firebase' is defined but never used no-unused-vars

src/pages/Details/index.js Line 9:8: 'KeyboardArrowUpIcon' is defined but never used no-unused-vars Line 10:8: 'KeyboardArrowDownIcon' is defined but never used no-unused-vars Line 24:12: 'zoomInage' is assigned a value but never used no-unused-vars Line 24:23: 'setZoomImage' is assigned a value but never used no-unused-vars Line 26:26: 'setBigImageSize' is assigned a value but never used no-unused-vars Line 27:26: 'setSmlImageSize' is assigned a value but never used no-unused-vars Line 40:21: 'setProdCat' is assigned a value but never used no-unused-vars Line 113:11: 'plus' is assigned a value but never used no-unused-vars Line 117:11: 'minus' is assigned a value but never used no-unused-vars Line 131:35: Array.prototype.map() expects a return value from arrow function array-callback-return Line 133:44: Array.prototype.map() expects a return value from arrow function array-callback-return Line 135:58: Array.prototype.map() expects a return value from arrow function array-callback-return Line 155:35: Array.prototype.map() expects a return value from arrow function array-callback-return Line 158:48: Array.prototype.map() expects a return value from arrow function array-callback-return Line 161:73: Array.prototype.map() expects a return value from arrow function array-callback-return Line 183:8: React Hook useEffect has missing dependencies: 'getCartData', 'prodCat.parentCat', 'prodCat.subCatName', 'props.data', and 'showReviews'. Either include them or remove the dependency array react-hooks/exhaustive-deps Line 233:46: Array.prototype.map() expects a return value from arrow function array-callback-return Line 270:69: Array.prototype.map() expects a return value from arrow function array-callback-return Line 353:49: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 393:86: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 411:86: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 429:86: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 629:69: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/Home/TopProducts/index.js Line 5:8: 'img2' is defined but never used no-unused-vars Line 6:8: 'img3' is defined but never used no-unused-vars Line 20:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 39:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 58:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/Home/index.js Line 13:8: 'axios' is defined but never used no-unused-vars Line 18:22: 'setprodData' is assigned a value but never used no-unused-vars Line 45:33: Array.prototype.map() expects a return value from arrow function array-callback-return Line 47:44: Array.prototype.map() expects a return value from arrow function array-callback-return Line 59:8: React Hook useEffect has missing dependencies: 'catArr' and 'prodData'. Either include them or remove the dependency array react-hooks/exhaustive-deps Line 69:40: Array.prototype.map() expects a return value from arrow function array-callback-return Line 70:48: Array.prototype.map() expects a return value from arrow function array-callback-return Line 72:25: Nested block is redundant no-lone-blocks Line 74:62: Array.prototype.map() expects a return value from arrow function array-callback-return Line 88:8: React Hook useEffect has a missing dependency: 'prodData'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 98:33: Array.prototype.map() expects a return value from arrow function array-callback-return Line 101:48: Array.prototype.map() expects a return value from arrow function array-callback-return Line 103:69: Array.prototype.map() expects a return value from arrow function array-callback-return Line 114:8: React Hook useEffect has missing dependencies: 'bestSellsArr' and 'prodData'. Either include them or remove the dependency array react-hooks/exhaustive-deps Line 138:45: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid Line 192:29: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/Home/slider/index.js Line 1:17: 'useEffect' is defined but never used no-unused-vars Line 7:8: 'Button' is defined but never used no-unused-vars Line 35:25: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text Line 45:25: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/Listing/index.js Line 20:12: 'currentId' is assigned a value but never used no-unused-vars Line 20:23: 'setCurrentId' is assigned a value but never used no-unused-vars Line 30:42: Array.prototype.map() expects a return value from arrow function array-callback-return Line 35:53: Expected '===' and instead saw '==' eqeqeq Line 38:52: Array.prototype.map() expects a return value from arrow function array-callback-return Line 39:70: Array.prototype.map() expects a return value from arrow function array-callback-return Line 51:56: Array.prototype.map() expects a return value from arrow function array-callback-return Line 53:83: Expected '===' and instead saw '==' eqeqeq Line 54:70: Array.prototype.map() expects a return value from arrow function array-callback-return Line 75:8: React Hook useEffect has missing dependencies: 'itemsData', 'props.data', and 'props.single'. Either include them or remove the dependency array react-hooks/exhaustive-deps Line 85:42: Array.prototype.map() expects a return value from arrow function array-callback-return Line 91:48: Array.prototype.map() expects a return value from arrow function array-callback-return Line 92:66: Array.prototype.map() expects a return value from arrow function array-callback-return Line 108:56: Array.prototype.map() expects a return value from arrow function array-callback-return Line 110:83: Expected '===' and instead saw '==' eqeqeq Line 111:70: Array.prototype.map() expects a return value from arrow function array-callback-return Line 142:42: Array.prototype.map() expects a return value from arrow function array-callback-return Line 148:52: Array.prototype.map() expects a return value from arrow function array-callback-return Line 150:77: Array.prototype.map() expects a return value from arrow function array-callback-return Line 163:56: Array.prototype.map() expects a return value from arrow function array-callback-return Line 164:83: Expected '===' and instead saw '==' eqeqeq Line 165:62: Array.prototype.map() expects a return value from arrow function array-callback-return Line 189:42: Array.prototype.map() expects a return value from arrow function array-callback-return Line 194:53: Expected '===' and instead saw '==' eqeqeq Line 197:52: Array.prototype.map() expects a return value from arrow function array-callback-return Line 198:70: Array.prototype.map() expects a return value from arrow function array-callback-return Line 210:56: Array.prototype.map() expects a return value from arrow function array-callback-return Line 212:83: Expected '===' and instead saw '==' eqeqeq Line 213:70: Array.prototype.map() expects a return value from arrow function array-callback-return Line 232:25: Array.prototype.map() expects a return value from arrow function array-callback-return Line 239:15: 'list3' is assigned a value but never used no-unused-vars

src/pages/NotFound/index.js Line 12:21: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/SignIn/index.js Line 4:8: 'Box' is defined but never used no-unused-vars Line 11:10: 'initializeApp' is defined but never used no-unused-vars Line 61:23: 'user' is assigned a value but never used no-unused-vars Line 77:23: 'errorCode' is assigned a value but never used no-unused-vars Line 78:23: 'errorMessage' is assigned a value but never used no-unused-vars Line 91:17: 'token' is assigned a value but never used no-unused-vars Line 93:17: 'user' is assigned a value but never used no-unused-vars Line 105:17: 'errorCode' is assigned a value but never used no-unused-vars Line 106:17: 'errorMessage' is assigned a value but never used no-unused-vars Line 108:17: 'email' is assigned a value but never used no-unused-vars Line 110:17: 'credential' is assigned a value but never used no-unused-vars Line 168:105: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

src/pages/SignUp/index.js Line 4:8: 'Box' is defined but never used no-unused-vars Line 10:8: 'GoogleImg' is defined but never used no-unused-vars Line 12:10: 'initializeApp' is defined but never used no-unused-vars Line 43:23: 'user' is assigned a value but never used no-unused-vars Line 53:23: 'errorCode' is assigned a value but never used no-unused-vars Line 54:23: 'errorMessage' is assigned a value but never used no-unused-vars

src/pages/cart/index.js Line 1:29: 'useState' is defined but never used no-unused-vars Line 10:8: 'axios' is defined but never used no-unused-vars Line 15:22: 'addToCart' is assigned a value but never used no-unused-vars Line 27:6: React Hook useEffect has a missing dependency: 'history'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 108:39: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

ERROR in ./src/hooks/useCart.js 5:0-38 Module not found: Error: You attempted to import ../../App which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/.

webpack compiled with 1 error and 1 warning

ye error araha hai