diff --git a/apps/user-ui/app/(auth)/login.tsx b/apps/user-ui/app/(auth)/login.tsx index 98a86df..0ffc5b1 100644 --- a/apps/user-ui/app/(auth)/login.tsx +++ b/apps/user-ui/app/(auth)/login.tsx @@ -184,8 +184,6 @@ function Login() { const mobile = data.mobile.trim(); // Validate mobile number if (!mobile) { - console.log('no mobile number found') - setError("mobile", { type: "manual", message: "Mobile number is required", @@ -229,8 +227,6 @@ function Login() { } try { - console.log('calling the login function') - const response = await loginMutation.mutateAsync({ identifier: selectedMobile, password: data.password, diff --git a/apps/user-ui/app/(auth)/register.tsx b/apps/user-ui/app/(auth)/register.tsx index 613e671..157e069 100644 --- a/apps/user-ui/app/(auth)/register.tsx +++ b/apps/user-ui/app/(auth)/register.tsx @@ -17,7 +17,6 @@ function Register() { await register(formData); // Auth context will handle navigation on successful registration } catch (error: any) { - console.error('Registration error:', error); Alert.alert( 'Registration Failed', error.message || 'Failed to create account. Please try again.' diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx index 1fb8c5f..845bbd1 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx @@ -7,7 +7,7 @@ import FontAwesome5 from '@expo/vector-icons/FontAwesome5'; export default function About() { const openLink = (url: string) => { - Linking.openURL(url).catch((err) => console.error("Couldn't load page", err)); + Linking.openURL(url).catch((err) => {}); }; return ( diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx index 041e65e..bc8b33f 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx @@ -130,9 +130,6 @@ export default function Coupons() { refetch(); }); - console.log({data, error}) - - if (isLoading) { return ( diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx index fe89bca..2253fa1 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx @@ -32,8 +32,6 @@ function EditProfile() { // Navigate back to profile/me page router.replace('/(drawer)/(tabs)/me'); } catch (error) { - JSON.stringify(error); - console.error('Update profile error:', error); throw error; } }; diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx index 031b0db..6798475 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx @@ -17,7 +17,6 @@ export default function Me() { useFocusEffect(() => { const target = getNavigationTarget(); - console.log({target}) if (target) { router.replace(target as any); diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx index d1009b8..4cea5a2 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx @@ -50,8 +50,6 @@ export default function OrderDetails() { Alert.alert('Success', 'Order cancelled successfully'); }, onError: (error: any) => { - console.log({error}) - Alert.alert('Error', error.message || 'Failed to cancel order'); }, }); diff --git a/apps/user-ui/app/api/auth/token+api.ts b/apps/user-ui/app/api/auth/token+api.ts index 84483d8..e89e4c2 100644 --- a/apps/user-ui/app/api/auth/token+api.ts +++ b/apps/user-ui/app/api/auth/token+api.ts @@ -1,4 +1,3 @@ export async function GET(request:Request) { - console.log('from the get token request') } \ No newline at end of file diff --git a/apps/user-ui/app/index.tsx b/apps/user-ui/app/index.tsx index c09216b..941a497 100755 --- a/apps/user-ui/app/index.tsx +++ b/apps/user-ui/app/index.tsx @@ -16,7 +16,5 @@ export default function Index() { ); } - - console.log("from the user ui index.tsx - isAuthenticated:", isAuthenticated); return ; } \ No newline at end of file diff --git a/apps/user-ui/components/BannerCarousel.tsx b/apps/user-ui/components/BannerCarousel.tsx index 289b1ff..7844d3f 100644 --- a/apps/user-ui/components/BannerCarousel.tsx +++ b/apps/user-ui/components/BannerCarousel.tsx @@ -66,7 +66,6 @@ export default function BannerCarousel() { router.push(`/(drawer)/(tabs)/home/product-detail/${banner.productIds[0]}`); } else if (banner.redirectUrl) { // Handle external URL - could open in browser or handle deep links - console.log('Banner redirect URL:', banner.redirectUrl); } // If no productIds or redirectUrl, banner is just for display }; diff --git a/apps/user-ui/components/HealthTestWrapper.tsx b/apps/user-ui/components/HealthTestWrapper.tsx index 82f435b..662f3ff 100644 --- a/apps/user-ui/components/HealthTestWrapper.tsx +++ b/apps/user-ui/components/HealthTestWrapper.tsx @@ -49,9 +49,6 @@ const HealthTestWrapper: React.FC = ({ children }) => { } }, [versionFromBackend]); - // Log app version - console.log('App Version:', Constants.expoConfig?.version); - console.log('Backend Version:', versionFromBackend); if (isLoading) { return ( diff --git a/apps/user-ui/components/LocationTestWrapper.tsx b/apps/user-ui/components/LocationTestWrapper.tsx index e16ae82..a162794 100644 --- a/apps/user-ui/components/LocationTestWrapper.tsx +++ b/apps/user-ui/components/LocationTestWrapper.tsx @@ -37,7 +37,6 @@ const isEmulator = (): boolean => { return false; } catch (error) { // If detection fails, assume it's a real device to be safe - console.warn('Emulator detection failed:', error); return false; } }; @@ -73,7 +72,6 @@ const LocationTestWrapper: React.FC = ({ children }) = const { status } = await Location.requestForegroundPermissionsAsync(); if (status === 'granted') { const location = await Location.getCurrentPositionAsync({}); - console.log('User location:', location.coords); setUserLocation(location); } else { setLocationDialogOpen(true); diff --git a/apps/user-ui/components/NextOrderGlimpse.tsx b/apps/user-ui/components/NextOrderGlimpse.tsx index 94c44ed..f19296c 100644 --- a/apps/user-ui/components/NextOrderGlimpse.tsx +++ b/apps/user-ui/components/NextOrderGlimpse.tsx @@ -100,8 +100,6 @@ export default function NextOrderGlimpse() { { - console.log('from next press') - setNavigationTarget(`/(drawer)/(tabs)/me/my-orders/${nextOrder.id}`); router.replace('/(drawer)/(tabs)/me'); }} diff --git a/apps/user-ui/components/PaymentAndOrderComponent.tsx b/apps/user-ui/components/PaymentAndOrderComponent.tsx index bf7b0a1..3dcf5de 100644 --- a/apps/user-ui/components/PaymentAndOrderComponent.tsx +++ b/apps/user-ui/components/PaymentAndOrderComponent.tsx @@ -160,8 +160,6 @@ const PaymentAndOrderComponent: React.FC = ({ isFlashDelivery: isFlashDelivery, }; - console.log({orderData}) - placeOrderMutation.mutate(orderData); }; diff --git a/apps/user-ui/components/ProductDetail.tsx b/apps/user-ui/components/ProductDetail.tsx index 5b93f5b..87d2e94 100644 --- a/apps/user-ui/components/ProductDetail.tsx +++ b/apps/user-ui/components/ProductDetail.tsx @@ -159,7 +159,7 @@ const ProductDetail: React.FC = ({ productId, isFlashDeliver setHasMore(newHasMore); setReviewsOffset(reset ? 10 : reviewsOffset + 10); } catch (error) { - console.error('Error loading reviews:', error); + // Error loading reviews handled silently } finally { setReviewsLoading(false); } diff --git a/apps/user-ui/components/SlotSpecificView.tsx b/apps/user-ui/components/SlotSpecificView.tsx index 82af690..2e7c475 100644 --- a/apps/user-ui/components/SlotSpecificView.tsx +++ b/apps/user-ui/components/SlotSpecificView.tsx @@ -354,7 +354,6 @@ export function SlotProducts({ slotId:slotIdParent, storeId:storeIdParent, baseU const handleAddToCart = (productId: number) => { setIsLoadingDialogOpen(true); - // console.log({productId}) addToCart(productId, 1, slotId || 0, () => setIsLoadingDialogOpen(false)); }; @@ -394,8 +393,6 @@ export function SlotProducts({ slotId:slotIdParent, storeId:storeIdParent, baseU const filteredProducts: any[] = storeIdNum ? productsQuery?.data?.filter(p => p.store?.id === storeIdNum) || [] : slotQuery.data.products; - console.log({filteredProducts}) - return ( = ({ children }) => { ); } } catch (error) { - console.log('Update check failed:', error); + // Update check failed silently } }; diff --git a/apps/user-ui/components/checkout-page.tsx b/apps/user-ui/components/checkout-page.tsx index 817215d..26b43be 100644 --- a/apps/user-ui/components/checkout-page.tsx +++ b/apps/user-ui/components/checkout-page.tsx @@ -31,8 +31,7 @@ const CheckoutPage: React.FC = ({ isFlashDelivery = false }) const cartType: "regular" | "flash" = isFlashDelivery ? "flash" : "regular"; const { data: cartData, refetch: refetchCart } = useGetCart({}, cartType); - console.log({cartType}) - + const { data: addresses, refetch: refetchAddresses } = trpc.user.address.getUserAddresses.useQuery(); const { data: slotsData, refetch: refetchSlots } = trpc.user.slots.getSlots.useQuery(); const { data: constsData } = useGetEssentialConsts(); diff --git a/apps/user-ui/hooks/cart-query-hooks.tsx b/apps/user-ui/hooks/cart-query-hooks.tsx index e5857ba..5058511 100644 --- a/apps/user-ui/hooks/cart-query-hooks.tsx +++ b/apps/user-ui/hooks/cart-query-hooks.tsx @@ -301,8 +301,6 @@ export function useAddToCart(options?: { const addToCart = (productId: number, quantity = 1, slotId?: number, onSettled?: (data: any, error: any) => void) => { - // console.log({productId, quantity, slotId}) - if (slotId == null) { throw new Error('slotId is required for adding to cart'); } diff --git a/apps/user-ui/hooks/useAuthenticatedRoute.ts b/apps/user-ui/hooks/useAuthenticatedRoute.ts index 20f1612..bb36c25 100644 --- a/apps/user-ui/hooks/useAuthenticatedRoute.ts +++ b/apps/user-ui/hooks/useAuthenticatedRoute.ts @@ -40,7 +40,6 @@ export function useAuthenticatedRoute(options: AuthenticatedRouteOptions = {}) { router.push('/(auth)/login'); }) .catch((error) => { - console.error('Failed to store redirect state:', error); // Still navigate to login even if storage fails router.push('/(auth)/login'); }); diff --git a/apps/user-ui/scripts/reset-project.js b/apps/user-ui/scripts/reset-project.js index 51dff15..3deb1c6 100755 --- a/apps/user-ui/scripts/reset-project.js +++ b/apps/user-ui/scripts/reset-project.js @@ -50,7 +50,6 @@ const moveDirectories = async (userInput) => { if (userInput === "y") { // Create the app-example directory await fs.promises.mkdir(exampleDirPath, { recursive: true }); - console.log(`šŸ“ /${exampleDir} directory created.`); } // Move old directories to new app-example directory or delete them @@ -60,41 +59,25 @@ const moveDirectories = async (userInput) => { if (userInput === "y") { const newDirPath = path.join(root, exampleDir, dir); await fs.promises.rename(oldDirPath, newDirPath); - console.log(`āž”ļø /${dir} moved to /${exampleDir}/${dir}.`); } else { await fs.promises.rm(oldDirPath, { recursive: true, force: true }); - console.log(`āŒ /${dir} deleted.`); } - } else { - console.log(`āž”ļø /${dir} does not exist, skipping.`); } } // Create new /app directory const newAppDirPath = path.join(root, newAppDir); await fs.promises.mkdir(newAppDirPath, { recursive: true }); - console.log("\nšŸ“ New /app directory created."); // Create index.tsx const indexPath = path.join(newAppDirPath, "index.tsx"); await fs.promises.writeFile(indexPath, indexContent); - console.log("šŸ“„ app/index.tsx created."); // Create _layout.tsx const layoutPath = path.join(newAppDirPath, "_layout.tsx"); await fs.promises.writeFile(layoutPath, layoutContent); - console.log("šŸ“„ app/_layout.tsx created."); - - console.log("\nāœ… Project reset complete. Next steps:"); - console.log( - `1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${ - userInput === "y" - ? `\n3. Delete the /${exampleDir} directory when you're done referencing it.` - : "" - }` - ); } catch (error) { - console.error(`āŒ Error during script execution: ${error.message}`); + // Error during script execution } }; @@ -105,7 +88,6 @@ rl.question( if (userInput === "y" || userInput === "n") { moveDirectories(userInput).finally(() => rl.close()); } else { - console.log("āŒ Invalid input. Please enter 'Y' or 'N'."); rl.close(); } } diff --git a/apps/user-ui/services/notif-service/notif-register.ts b/apps/user-ui/services/notif-service/notif-register.ts index dc317f6..0c82e75 100755 --- a/apps/user-ui/services/notif-service/notif-register.ts +++ b/apps/user-ui/services/notif-service/notif-register.ts @@ -40,7 +40,6 @@ export async function registerForPushNotificationsAsync() { projectId, }) ).data; - console.log(pushTokenString); return pushTokenString; } catch (e: unknown) { throw new Error(`${e}`); diff --git a/apps/user-ui/src/api-hooks/auth.api.ts b/apps/user-ui/src/api-hooks/auth.api.ts index a462431..99dc48a 100644 --- a/apps/user-ui/src/api-hooks/auth.api.ts +++ b/apps/user-ui/src/api-hooks/auth.api.ts @@ -59,6 +59,6 @@ export const useRegister = () => { export const useUpdateProfile = () => { return useMutation({ mutationFn: updateProfileApi, - onError: e => console.log(JSON.stringify(e)) + onError: () => {} }); }; \ No newline at end of file diff --git a/apps/user-ui/src/components/AddressForm.tsx b/apps/user-ui/src/components/AddressForm.tsx index b8c4fe0..3e7e011 100644 --- a/apps/user-ui/src/components/AddressForm.tsx +++ b/apps/user-ui/src/components/AddressForm.tsx @@ -79,7 +79,6 @@ const AddressForm: React.FC = ({ onSuccess, initialValues, isE setCurrentLocation({ latitude, longitude }); Alert.alert('Success', 'Location attached successfully'); } catch (error) { - console.error('Location error:', error); setLocationError('Unable to fetch location. Please check your GPS settings.'); } finally { setLocationLoading(false); diff --git a/apps/user-ui/src/components/google-sign-in.tsx b/apps/user-ui/src/components/google-sign-in.tsx index fdc2423..60f1876 100644 --- a/apps/user-ui/src/components/google-sign-in.tsx +++ b/apps/user-ui/src/components/google-sign-in.tsx @@ -29,15 +29,6 @@ export default function GoogleSignInPKCE() { // }); - - // React.useEffect(() => { - // if (response?.type === "success") { - // const { authentication } = response; - // console.log("Access token:", authentication?.accessToken); - // } - // }, [response]); - - return (