Browse Source

perf: 继续优化掉console.log

zengkunsen 4 months ago
parent
commit
8d5ba99b27

+ 6 - 0
app/(auth)/(tabs)/(home)/(vehicle)/setVehiclesOne.tsx

@@ -43,11 +43,13 @@ const SetVehiclesOne = () => {
                 const response = await chargeStationService.fetchCarBrand();
                 if (response) {
                     setProcessedCarData(response.data);
+                    console.log(
                         'All brand names:',
                         response.data.map((brand) => brand.name)
                     );
                 }
             } catch (error) {
+                console.log(error);
             } finally {
                 setLoading(false);
             }
@@ -56,6 +58,10 @@ const SetVehiclesOne = () => {
     }, []);
 
     useEffect(() => {
+        console.log('Zustand VehicleBrand', vehicleBrand);
+        console.log('Zustand BrandID', BrandID);
+        console.log('Zustand VehicleModel', vehicleModel);
+        console.log('Zustand ModelID', ModelID);
     }, [processedCarData]);
 
     const renderBrandItem = ({ item: brand }: { item: CarBrand }) => (

+ 0 - 1
component/chooseCar/chooseCarPageComponent.tsx

@@ -67,7 +67,6 @@ const chooseCarPageComponent = () => {
                     img_url: item.img_url
                 }));
 
-                // console.log(JSON.stringify(brandInfo, null, 2));
                 const brandName = brandInfo.map((item) => item.name);
                 console.log(brandName);
                 const brandNameDropdownOptions = brandInfo.map((item) => ({

+ 0 - 1
service/chargeStationService.tsx

@@ -432,7 +432,6 @@ class ChargeStationService {
                     return availableTimeSlots;
                 }
             } else {
-                console.log('invalid response');
             }
         } catch (error) {
             if (axios.isAxiosError(error)) {