diff --git a/components/Modals/ComplaintModal.tsx b/components/Modals/ComplaintModal.tsx index 461c04e23..feecca949 100644 --- a/components/Modals/ComplaintModal.tsx +++ b/components/Modals/ComplaintModal.tsx @@ -22,12 +22,13 @@ interface ModalProps { } interface ComplaintModalProps extends ModalProps { product: string; - user: string; + user?: string; //you did not passing the user in your mobile_customer_dashboard component + customerID?: string; //you have not added this and yet you were passing it in the component } // const token = getAuthTokenFromCookies('UTM_tracker'); const apiUrl = `https://team-mirage-super-amind2.onrender.com/api/v1/super-admin/feedback/register-complaints/`; -const ComplaintModal: React.FC = ({ isOpen, onClose, product, user }) => { +const ComplaintModal: React.FC = ({ isOpen, onClose, product, user, customerID }) => { const [description, setDescription] = useState(''); const [error, setError] = useState(null); diff --git a/http/checkout.ts b/http/checkout.ts index e4a6d4f4d..5dc9c6e57 100644 --- a/http/checkout.ts +++ b/http/checkout.ts @@ -3,7 +3,9 @@ import { useAuth } from '../context/AuthContext'; import $http from './axios'; import axios from 'axios'; -export const CART_ENDPOINT = 'https://zuri-cart-checkout.onrender.com/api/v1/checkout_cart'; + + +export const CART_ENDPOINT = "https://zuri-cart-checkout.onrender.com/api/v1/checkout_cart" export const STAGING_URL = process.env.NEXT_PUBLIC_APP_STAGING_URL || 'https://staging.zuri.team'; export const RECENTLY_VIEWED_ENDPOINT = 'https://staging.zuri.team/api/marketplace/v1/recently-viewed'; diff --git a/modules/auth/changeEmailAddress.tsx b/modules/auth/changeEmailAddress.tsx index b82377190..9276911f9 100644 --- a/modules/auth/changeEmailAddress.tsx +++ b/modules/auth/changeEmailAddress.tsx @@ -13,10 +13,9 @@ import { checkEmail } from '../../http/auth'; function ChangeEmailAddress() { const router = useRouter(); - const onSignUpWithEmailSuccess = (data: { message: string }) => { - if (data.message !== 'Email is available for use') { - const errorMessage = 'This email is already registered. Please try logging in or use a different email address.'; - notify({ message: errorMessage, type: 'error', theme: 'light' }); + const onSignUpWithEmailSuccess = (data: any) => { + if (data.status === 200) { + router.push('/auth/guest-signup-form') return; } }; diff --git a/modules/auth/component/ForgotPassword/ForgotPassword.tsx b/modules/auth/component/ForgotPassword/ForgotPassword.tsx index 729b5e3c8..ed163f4e4 100644 --- a/modules/auth/component/ForgotPassword/ForgotPassword.tsx +++ b/modules/auth/component/ForgotPassword/ForgotPassword.tsx @@ -26,8 +26,6 @@ const ForgotPassword = () => { router.push(`/auth/forgot-password-link-sent?email=${email}`); return; } - - notifyError(data.message); }; // Form validation @@ -107,7 +105,7 @@ const ForgotPassword = () => { { notify({ message: res.message, type: 'error', - theme: 'light' + theme: 'light', }); }, }); @@ -223,7 +223,15 @@ const Guestsignupform: React.FC = () => { /> - I agree with Zuri Terms of Service & Privacy Policy. + I agree with Zuri{' '} + + Terms of Service + {' '} + &{' '} + + Privacy Policy + + .