summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-04-10 14:43:30 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-04-10 14:43:30 +0700
commit9c2c365da1edb2e2835d19303cdee81e53f3deb8 (patch)
tree372ab9938a9b360e73bc6ca31d53906eab4d5aff /src/lib
parent4a05c21f583e1482acb126d51aafe5cbce49707f (diff)
fix reset password, register, search, suggest
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/auth/api/registerApi.js2
-rw-r--r--src/lib/auth/components/PersonalProfile.jsx2
-rw-r--r--src/lib/checkout/components/Checkout.jsx2
-rw-r--r--src/lib/product/components/Product/ProductDesktop.jsx2
-rw-r--r--src/lib/product/components/Product/ProductMobile.jsx2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/auth/api/registerApi.js b/src/lib/auth/api/registerApi.js
index f3d75ce8..f9413f8c 100644
--- a/src/lib/auth/api/registerApi.js
+++ b/src/lib/auth/api/registerApi.js
@@ -1,6 +1,6 @@
import odooApi from '@/core/api/odooApi'
-const registerApi = async ({ data }) => {
+const registerApi = async ({ ...data }) => {
const dataRegister = await odooApi('POST', '/api/v1/user/register', data)
return dataRegister
}
diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx
index 0b387f2e..4f606ed4 100644
--- a/src/lib/auth/components/PersonalProfile.jsx
+++ b/src/lib/auth/components/PersonalProfile.jsx
@@ -34,7 +34,7 @@ const PersonalProfile = () => {
let data = values
if (!values.password) delete data.password
const isUpdated = await editPersonalProfileApi({ data })
- console.log(isUpdated)
+
if (isUpdated?.user) {
setAuth(isUpdated.user)
setValue('password', '')
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 17ac20e1..37a67d88 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -270,7 +270,7 @@ const Checkout = () => {
{products?.map((product) => (
<tr key={product.id}>
<td className='flex'>
- <div className='w-[30%] flex-shrink-0'>
+ <div className='w-[20%] flex-shrink-0'>
<Image
src={product?.parent?.image}
alt={product?.name}
diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx
index faff375f..37a258a6 100644
--- a/src/lib/product/components/Product/ProductDesktop.jsx
+++ b/src/lib/product/components/Product/ProductDesktop.jsx
@@ -75,7 +75,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => {
}
const productSimilarQuery = [
- product?.name.replace(/[()/"&]/g, ''),
+ product?.name,
`fq=-product_id_i:${product.id}`,
`fq=-manufacture_id_i:${product.manufacture?.id || 0}`
].join('&')
diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx
index 493fcbf7..19b4c4b2 100644
--- a/src/lib/product/components/Product/ProductMobile.jsx
+++ b/src/lib/product/components/Product/ProductMobile.jsx
@@ -96,7 +96,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => {
}
const productSimilarQuery = [
- product?.name.replace(/[()/"&]/g, ''),
+ product?.name,
`fq=-product_id_i:${product.id}`,
`fq=-manufacture_id_i:${product.manufacture?.id || 0}`
].join('&')