Refactor referral code handling by removing unnecessary console logs and improving error handling in the referral code fetching process. Update test script to include referral tests and adjust product item validation logic for better clarity and functionality.
This commit is contained in:
@@ -23,7 +23,6 @@ export const redeemReferralCode = async ({
|
||||
customerId,
|
||||
code: referralCode,
|
||||
});
|
||||
console.log("Referral code redeemed");
|
||||
console.log("Redemption", redemption);
|
||||
|
||||
return redemption;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,6 @@ const useReferralCode = (referrerId: string) => {
|
||||
const { code } = await getReferralCode(referrerId);
|
||||
setReferralCode(code);
|
||||
} catch (error) {
|
||||
console.log("Failed to get referral code", error);
|
||||
toast.error(`Error fetching referral code: ${error}`);
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user