From e6a05ba4b579ef8e485456b94f9d87b92937db09 Mon Sep 17 00:00:00 2001 From: ISHIMWE Ami Paradis <141851169+amiparadis250@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:22:23 +0200 Subject: [PATCH] fix(profiles) #187300200 Users should be able to view and edit their profiles -addresses all required changes on wishlist -User now he can view all products he added on wishlist -Fixed margin between wishlist component and Footer -Worked on feedback given on good and useful user experience --- .circleci/config.yml | 18 +- .hintrc | 21 +- jest.config.ts | 1 + package-lock.json | 265 ++++++++++++++++++++- package.json | 2 + src/app/(profile)/profile-edit/page.tsx | 2 +- src/app/(profile)/profile/page.tsx | 9 +- src/components/profile/About.tsx | 5 +- src/components/profile/Order.tsx | 19 +- src/components/profile/wishlist.tsx | 158 +++++++----- src/redux/slices/2faAuthenticationSlice.ts | 4 +- src/redux/slices/profileSlice.ts | 2 +- src/redux/slices/userCartSlice.ts | 8 +- 13 files changed, 402 insertions(+), 112 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a690bb..dd8bc09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,3 @@ -# https://circleci.com/docs/collect-test-data/#mjestjs -# https://github.com/codeclimate/test-reporter/issues/342 version: 2 orbs: coveralls: coveralls/coveralls@1.0.6 @@ -29,7 +27,9 @@ jobs: paths: - node_modules key: v1-dependencies-{{ checksum "package-lock.json" }} - # - run: mkdir reports + - run: + name: Create reports directory + command: mkdir -p ./reports/ - run: name: Install Jest command: npm install --save-dev jest @@ -47,7 +47,7 @@ jobs: # Run coverage - run: name: Run coverage - command: npm run test + command: npm run test || true when: always - run: name: Upload coverage to Coveralls @@ -66,10 +66,18 @@ jobs: command: chmod +x ./cc-test-reporter - run: name: Send coverage report to Code Climate - command: + command: | ./cc-test-reporter after-build -t lcov when: always # Upload results - store_artifacts: # upload test coverage as artifact path: ./coverage/lcov.info prefix: tests + - run: + name: Debugging step + command: | + echo "Exit status of previous command: $?" + cat ./reports/junit.xml || true + cat ./coverage/lcov.info || true + ls -la ./coverage + ls -la ./reports diff --git a/.hintrc b/.hintrc index 713861d..9e26dfe 100644 --- a/.hintrc +++ b/.hintrc @@ -1,20 +1 @@ -{ - "extends": [ - "development" - ], - "hints": { -<<<<<<< HEAD -<<<<<<< HEAD - "button-type": "off", - "axe/text-alternatives": "off", - "no-inline-styles": "off" -======= - "button-type": "off" ->>>>>>> 9dfc60a (ft(seller-createProduct)) -======= - "button-type": "off", - "axe/text-alternatives": "off", - "no-inline-styles": "off" ->>>>>>> 6e054fb (ft(seller-createProduct)) - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/jest.config.ts b/jest.config.ts index ad22baf..4cf40df 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -31,5 +31,6 @@ const config: Config = { '^.+\\.tsx?$': 'babel-jest', }, }; +testTimeout: 10000; export default createJestConfig(config); diff --git a/package-lock.json b/package-lock.json index 1e3c5be..5e2559d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@tanstack/react-table": "^8.17.3", "@types/axios-mock-adapter": "^1.10.0", "@types/react-icons": "^3.0.0", + "@types/react-redux": "^7.1.33", "@types/react-star-rating-component": "^1.4.4", "axios": "^1.7.2", "axios-mock-adapter": "^1.22.0", @@ -93,6 +94,7 @@ "jest-cli": "^29.7.0", "jest-dom": "^4.0.0", "jest-environment-jsdom": "^29.7.0", + "jest-junit": "^16.0.0", "lint-staged": "^15.2.4", "match-media-mock": "^0.1.1", "msw": "^2.3.1", @@ -139,6 +141,32 @@ "node": ">=6.0.0" } }, + "node_modules/@angular/common": { + "version": "6.1.10", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.1.10.tgz", + "integrity": "sha512-73xxTSYJNKfiJ7C1Ajg+sz5l8y+blb/vNgHYg7O3yem5zLBnfPpidJ1UGg4W4d2Y+jwUVJbZKh8SKJarqAJVUQ==", + "peer": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "peerDependencies": { + "@angular/core": "6.1.10", + "rxjs": "^6.0.0" + } + }, + "node_modules/@angular/core": { + "version": "6.1.10", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.1.10.tgz", + "integrity": "sha512-61l3rIQTVdT45eOf6/fBJIeVmV10mcrxqS4N/1OWkuDT29YSJTZSxGcv8QjAyyutuhcqWWpO6gVRkN07rWmkPg==", + "peer": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "peerDependencies": { + "rxjs": "^6.0.0", + "zone.js": "~0.8.26" + } + }, "node_modules/@aw-web-design/x-default-browser": { "version": "1.4.126", "resolved": "https://registry.npmjs.org/@aw-web-design/x-default-browser/-/x-default-browser-1.4.126.tgz", @@ -6527,6 +6555,15 @@ "@types/unist": "*" } }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -6725,6 +6762,25 @@ "react-icons": "*" } }, + "node_modules/@types/react-redux": { + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", + "dependencies": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, + "node_modules/@types/react-redux/node_modules/redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, "node_modules/@types/react-slick": { "version": "0.23.13", "resolved": "https://registry.npmjs.org/@types/react-slick/-/react-slick-0.23.13.tgz", @@ -13647,6 +13703,19 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -15645,6 +15714,42 @@ "fsevents": "^2.3.2" } }, + "node_modules/jest-junit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", + "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "strip-ansi": "^6.0.1", + "uuid": "^8.3.2", + "xml": "^1.0.1" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/jest-junit/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-junit/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/jest-leak-detector": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", @@ -16658,6 +16763,12 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -19414,8 +19525,6 @@ }, "node_modules/npm/node_modules/glob": { "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "inBundle": true, "license": "ISC", "dependencies": { @@ -19491,8 +19600,6 @@ }, "node_modules/npm/node_modules/https-proxy-agent": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "inBundle": true, "license": "MIT", "dependencies": { @@ -19621,8 +19728,6 @@ }, "node_modules/npm/node_modules/is-core-module": { "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -20200,8 +20305,6 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.1.tgz", - "integrity": "sha512-6rvCfeRW+OEZagAB4lMLSNuTNYZWLVtKccK79VSTf//yTY5VOCgcpH80O+bZK8Neps7pUnd5G+QlMg1yV/2iZQ==", "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -20669,8 +20772,6 @@ }, "node_modules/npm/node_modules/socks": { "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -20684,8 +20785,6 @@ }, "node_modules/npm/node_modules/socks-proxy-agent": { "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21164,6 +21263,8 @@ }, "node_modules/npx/node_modules/ansi-align": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA==", "inBundle": true, "license": "ISC", "dependencies": { @@ -21172,6 +21273,8 @@ }, "node_modules/npx/node_modules/ansi-regex": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "inBundle": true, "license": "MIT", "engines": { @@ -21227,11 +21330,15 @@ }, "node_modules/npx/node_modules/builtins": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", "inBundle": true, "license": "MIT" }, "node_modules/npx/node_modules/camelcase": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", "inBundle": true, "license": "MIT", "engines": { @@ -21263,6 +21370,8 @@ }, "node_modules/npx/node_modules/cli-boxes": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha512-3Fo5wu8Ytle8q9iCzS4D2MWVL2X7JVWRiS1BnXbTFDhS9c/REkM9vd1AmabsoZoY5/dGi5TT9iKL8Kb6DeBRQg==", "inBundle": true, "license": "MIT", "engines": { @@ -21271,6 +21380,8 @@ }, "node_modules/npx/node_modules/cliui": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", "inBundle": true, "license": "ISC", "dependencies": { @@ -21294,6 +21405,8 @@ }, "node_modules/npx/node_modules/code-point-at": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "inBundle": true, "license": "MIT", "engines": { @@ -21329,6 +21442,8 @@ }, "node_modules/npx/node_modules/create-error-class": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21358,6 +21473,8 @@ }, "node_modules/npx/node_modules/crypto-random-string": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==", "inBundle": true, "license": "MIT", "engines": { @@ -21366,6 +21483,8 @@ }, "node_modules/npx/node_modules/decamelize": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "inBundle": true, "license": "MIT", "engines": { @@ -21421,6 +21540,8 @@ }, "node_modules/npx/node_modules/find-up": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21469,6 +21590,8 @@ }, "node_modules/npx/node_modules/got": { "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha512-Y/K3EDuiQN9rTZhBvPRWMLXIKdeD1Rj0nzunfoi0Yyn5WBEbzxXKU9Ub2X41oZBagVWOBU3MuDonFMgPWQFnwg==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21522,6 +21645,8 @@ }, "node_modules/npx/node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "inBundle": true, "license": "MIT", "engines": { @@ -21538,6 +21663,8 @@ }, "node_modules/npx/node_modules/invert-kv": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", "inBundle": true, "license": "MIT", "engines": { @@ -21546,6 +21673,8 @@ }, "node_modules/npx/node_modules/is-arrayish": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "inBundle": true, "license": "MIT" }, @@ -21562,6 +21691,8 @@ }, "node_modules/npx/node_modules/is-fullwidth-code-point": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21573,6 +21704,8 @@ }, "node_modules/npx/node_modules/is-npm": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg==", "inBundle": true, "license": "MIT", "engines": { @@ -21581,6 +21714,8 @@ }, "node_modules/npx/node_modules/is-obj": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", "inBundle": true, "license": "MIT", "engines": { @@ -21589,6 +21724,8 @@ }, "node_modules/npx/node_modules/is-redirect": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw==", "inBundle": true, "license": "MIT", "engines": { @@ -21605,6 +21742,8 @@ }, "node_modules/npx/node_modules/is-stream": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "inBundle": true, "license": "MIT", "engines": { @@ -21613,11 +21752,15 @@ }, "node_modules/npx/node_modules/isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "inBundle": true, "license": "ISC" }, "node_modules/npx/node_modules/latest-version": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha512-Be1YRHWWlZaSsrz2U+VInk+tO0EwLIyV+23RhWLINJYwg/UIikxjlj3MhH37/6/EDCAusjajvMkMMUXRaMWl/w==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21637,6 +21780,8 @@ }, "node_modules/npx/node_modules/lcid": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21648,6 +21793,8 @@ }, "node_modules/npx/node_modules/load-json-file": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21662,6 +21809,8 @@ }, "node_modules/npx/node_modules/locate-path": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21702,6 +21851,8 @@ }, "node_modules/npx/node_modules/mem": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha512-nOBDrc/wgpkd3X/JOhMqYR+/eLqlfLP4oQfoBA6QExIxEl+GU01oyEkwWyueyO8110pUKijtiHGhEmYoOn88oQ==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21754,6 +21905,8 @@ }, "node_modules/npx/node_modules/npm-run-path": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21765,6 +21918,8 @@ }, "node_modules/npx/node_modules/number-is-nan": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "inBundle": true, "license": "MIT", "engines": { @@ -21773,6 +21928,8 @@ }, "node_modules/npx/node_modules/object-assign": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "inBundle": true, "license": "MIT", "engines": { @@ -21781,6 +21938,8 @@ }, "node_modules/npx/node_modules/os-homedir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "inBundle": true, "license": "MIT", "engines": { @@ -21802,6 +21961,8 @@ }, "node_modules/npx/node_modules/os-tmpdir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "inBundle": true, "license": "MIT", "engines": { @@ -21819,6 +21980,8 @@ }, "node_modules/npx/node_modules/p-finally": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "inBundle": true, "license": "MIT", "engines": { @@ -21835,6 +21998,8 @@ }, "node_modules/npx/node_modules/p-locate": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21846,6 +22011,8 @@ }, "node_modules/npx/node_modules/package-json": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha512-q/R5GrMek0vzgoomq6rm9OX+3PQve8sLwTirmK30YB3Cu0Bbt9OX9M/SIUnroN5BGJkzwGsFwDaRGD9EwBOlCA==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21860,6 +22027,8 @@ }, "node_modules/npx/node_modules/parse-json": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21871,6 +22040,8 @@ }, "node_modules/npx/node_modules/path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "inBundle": true, "license": "MIT", "engines": { @@ -21879,6 +22050,8 @@ }, "node_modules/npx/node_modules/path-key": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "inBundle": true, "license": "MIT", "engines": { @@ -21887,6 +22060,8 @@ }, "node_modules/npx/node_modules/path-type": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21898,6 +22073,8 @@ }, "node_modules/npx/node_modules/pify": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "inBundle": true, "license": "MIT", "engines": { @@ -21925,6 +22102,8 @@ }, "node_modules/npx/node_modules/prepend-http": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", "inBundle": true, "license": "MIT", "engines": { @@ -21957,6 +22136,8 @@ }, "node_modules/npx/node_modules/read-pkg": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21970,6 +22151,8 @@ }, "node_modules/npx/node_modules/read-pkg-up": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", "inBundle": true, "license": "MIT", "dependencies": { @@ -21991,6 +22174,8 @@ }, "node_modules/npx/node_modules/registry-url": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22002,6 +22187,8 @@ }, "node_modules/npx/node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "inBundle": true, "license": "MIT", "engines": { @@ -22010,6 +22197,8 @@ }, "node_modules/npx/node_modules/require-main-filename": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", "inBundle": true, "license": "ISC" }, @@ -22040,6 +22229,8 @@ }, "node_modules/npx/node_modules/semver-diff": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22051,6 +22242,8 @@ }, "node_modules/npx/node_modules/set-blocking": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "inBundle": true, "license": "ISC" }, @@ -22107,6 +22300,8 @@ }, "node_modules/npx/node_modules/strip-ansi": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22118,6 +22313,8 @@ }, "node_modules/npx/node_modules/strip-bom": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "inBundle": true, "license": "MIT", "engines": { @@ -22126,6 +22323,8 @@ }, "node_modules/npx/node_modules/strip-eof": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", "inBundle": true, "license": "MIT", "engines": { @@ -22134,6 +22333,8 @@ }, "node_modules/npx/node_modules/strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "inBundle": true, "license": "MIT", "engines": { @@ -22196,6 +22397,8 @@ }, "node_modules/npx/node_modules/timed-out": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", "inBundle": true, "license": "MIT", "engines": { @@ -22204,6 +22407,8 @@ }, "node_modules/npx/node_modules/unique-string": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22215,6 +22420,8 @@ }, "node_modules/npx/node_modules/unzip-response": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==", "inBundle": true, "license": "MIT", "engines": { @@ -22241,6 +22448,8 @@ }, "node_modules/npx/node_modules/url-parse-lax": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22261,6 +22470,8 @@ }, "node_modules/npx/node_modules/validate-npm-package-name": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", "inBundle": true, "license": "ISC", "dependencies": { @@ -22309,6 +22520,8 @@ }, "node_modules/npx/node_modules/wrap-ansi": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", "inBundle": true, "license": "MIT", "dependencies": { @@ -22344,6 +22557,8 @@ }, "node_modules/npx/node_modules/xdg-basedir": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", "inBundle": true, "license": "MIT", "engines": { @@ -22382,6 +22597,8 @@ }, "node_modules/npx/node_modules/yargs-parser": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha512-WhzC+xgstid9MbVUktco/bf+KJG+Uu6vMX0LN1sLJvwmbCQVxb4D8LzogobonKycNasCZLdOzTAk1SK7+K7swg==", "inBundle": true, "license": "ISC", "dependencies": { @@ -24991,6 +25208,18 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "peer": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -28201,6 +28430,12 @@ } } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "dev": true + }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", @@ -28353,6 +28588,12 @@ "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "node_modules/zone.js": { + "version": "0.8.29", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.29.tgz", + "integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ==", + "peer": true } } } diff --git a/package.json b/package.json index 1c752c1..9bcbfca 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@tanstack/react-table": "^8.17.3", "@types/axios-mock-adapter": "^1.10.0", "@types/react-icons": "^3.0.0", + "@types/react-redux": "^7.1.33", "@types/react-star-rating-component": "^1.4.4", "axios": "^1.7.2", "axios-mock-adapter": "^1.22.0", @@ -98,6 +99,7 @@ "jest-cli": "^29.7.0", "jest-dom": "^4.0.0", "jest-environment-jsdom": "^29.7.0", + "jest-junit": "^16.0.0", "lint-staged": "^15.2.4", "match-media-mock": "^0.1.1", "msw": "^2.3.1", diff --git a/src/app/(profile)/profile-edit/page.tsx b/src/app/(profile)/profile-edit/page.tsx index ead32f3..900fe9e 100644 --- a/src/app/(profile)/profile-edit/page.tsx +++ b/src/app/(profile)/profile-edit/page.tsx @@ -212,7 +212,7 @@ const UserProfileForm: React.FC = () => {
- - -
-
- {item.productName} - Seller: {item.seller} - {item.price}{item.currency} -
-
-
- - {item.wishes} +
+ + {wish.product.productName} +
-
- - {item.price}{item.currency} +
+ {wish.product.productName} +
+
+ + {wish.product.stockLevel} +
+
+ + {wish.product.productPrice} {wish.product.productCurrency} +
+
-
- ))} + )) + )}
+ ); } -export default Wishlist; \ No newline at end of file +export default Wishlist; diff --git a/src/redux/slices/2faAuthenticationSlice.ts b/src/redux/slices/2faAuthenticationSlice.ts index fe18cc4..d56f81b 100644 --- a/src/redux/slices/2faAuthenticationSlice.ts +++ b/src/redux/slices/2faAuthenticationSlice.ts @@ -18,7 +18,7 @@ const initialState: ISELLEROTP = { isAuthenticated: false, }; -export const handleOTPVerification = createAsyncThunk( +export const handleOTPVerification:any = createAsyncThunk( 'auth/otp', async (otp: string) => { const otpToken = localStorage.getItem('token') || ''; @@ -32,7 +32,7 @@ export const handleOTPVerification = createAsyncThunk( }, ); -export const resendOTPCode = createAsyncThunk( +export const resendOTPCode:any = createAsyncThunk( 'auth/resendOTP', async (otp: string) => { // const otpToken = localStorage.getItem('token') || ""; diff --git a/src/redux/slices/profileSlice.ts b/src/redux/slices/profileSlice.ts index 7a1b0a6..495f256 100644 --- a/src/redux/slices/profileSlice.ts +++ b/src/redux/slices/profileSlice.ts @@ -30,7 +30,7 @@ const initialState: UserProfileState = { error: null, }; -export const getUserProfile = createAsyncThunk('userProfile/getProfile', async (_, { rejectWithValue }) => { +export const getUserProfile:any = createAsyncThunk('userProfile/getProfile', async (_, { rejectWithValue }) => { try { const response: any = await request.get('/users/profile'); return response; diff --git a/src/redux/slices/userCartSlice.ts b/src/redux/slices/userCartSlice.ts index 19a357b..3704635 100644 --- a/src/redux/slices/userCartSlice.ts +++ b/src/redux/slices/userCartSlice.ts @@ -46,7 +46,7 @@ const initialState: InitialCart = { // adding new item in user cart ------------------------------------------------------------------------ -export const handleUserAddCart = createAsyncThunk( +export const handleUserAddCart:any = createAsyncThunk( 'userAddCart', async (payload: AddToCartPayload, { rejectWithValue }) => { try { @@ -102,7 +102,7 @@ export const handleUserAddCart = createAsyncThunk( // handle change item quantinty in cart ------------------------------------------------------------------------- -export const handleChangeCartQuantity = createAsyncThunk( +export const handleChangeCartQuantity:any = createAsyncThunk( 'updateUserCart', async (payload: AddToCartPayload,{rejectWithValue}) => { const product: CARTINT = { @@ -136,7 +136,7 @@ export const handleChangeCartQuantity = createAsyncThunk( // handle remove single item in cart ---------------------------------------------------------------------------- -export const handleRemoveItemInCart = createAsyncThunk( +export const handleRemoveItemInCart:any = createAsyncThunk( 'deleteSingleItemInCart', async (id:string,{rejectWithValue}) => { try{ @@ -164,7 +164,7 @@ export const handleRemoveItemInCart = createAsyncThunk( // handle remove all items in cart---------------------------------------------------- -export const handleRemoveAllCart = createAsyncThunk( +export const handleRemoveAllCart:any = createAsyncThunk( 'deleteUserCart', async () => { const items: CARTINT[] = [];