diff --git a/components/AppsComponent/CategoriesData/page.jsx b/components/AppsComponent/CategoriesData/page.jsx index f4bb58c..840da1a 100644 --- a/components/AppsComponent/CategoriesData/page.jsx +++ b/components/AppsComponent/CategoriesData/page.jsx @@ -13,13 +13,10 @@ import { useContext, useEffect, useMemo, useState } from "react"; import InfiniteScroll from "react-infinite-scroll-component"; export default function CategoriesData({ params, products }) { - console.log(", filters,....params", products); - const CTX = useContext(AppContext); const searchParams = useSearchParams(); useEffect(() => { - console.log("setStopProducts", CTX.state.stopProducts); if ( Number(searchParams.get("page")) === 0 || !Number(searchParams.get("page")) || @@ -73,15 +70,15 @@ export default function CategoriesData({ params, products }) { [searchParams] ); - console.log( - "filters", - filter, - isChecked, - selectedBrands, - rangePrice, - isRangePrice, - sortBy - ); + // + // "filters", + // filter, + // isChecked, + // selectedBrands, + // rangePrice, + // isRangePrice, + // sortBy + // ); const fetchBarnds = async () => { const res = await fetch( @@ -99,7 +96,6 @@ export default function CategoriesData({ params, products }) { const handleInfiniteNextFetchProducts = () => { // Increment the page number const nextPage = pageGetProducts + 1; - console.log("runeed-handleInfiniteNextFetchProducts", nextPage); const params = new URLSearchParams(searchParams.toString()); params.set("page", nextPage); @@ -134,8 +130,6 @@ export default function CategoriesData({ params, products }) { getData(); }, []); - console.log(pager?.totalPage > 1, pager?.totalPage); - return ( <>
diff --git a/components/AppsComponent/CheckoutData/page.jsx b/components/AppsComponent/CheckoutData/page.jsx index f559f99..5fd897a 100644 --- a/components/AppsComponent/CheckoutData/page.jsx +++ b/components/AppsComponent/CheckoutData/page.jsx @@ -30,8 +30,6 @@ const CheckoutData = () => { shippingId: shippingData[shippingId]?.id, }; - console.log(body); - const GetShippingData = async () => { try { const data = await Chapar.get( @@ -67,7 +65,6 @@ const CheckoutData = () => { ); CTX.setCheckOutData(data); setPermissionGoPay(true); - console.log(data); } catch ({ error, status }) { toast.error(`${error?.response?.data?.message}`, { position: "bottom-right", @@ -85,7 +82,6 @@ const CheckoutData = () => { const handleGoPayment = async () => { const token = localStorage.getItem("token").slice(7); - console.log(token); try { const data = await Chapar.post( `${process.env.NEXT_PUBLIC_API_URL}/order/bag/payment/${checkOutData?.id}?paymentMethod=1&access_token=${token}` diff --git a/components/AppsComponent/ProductData/page.jsx b/components/AppsComponent/ProductData/page.jsx index e337c3f..446ca30 100644 --- a/components/AppsComponent/ProductData/page.jsx +++ b/components/AppsComponent/ProductData/page.jsx @@ -20,8 +20,6 @@ const ProductData = ({ params, data }) => { setProduct(post.product); }; - console.log("product", product); - const displaySpecifications = (specs) => { let data = []; if (specs?.length > 3) { @@ -38,7 +36,7 @@ const ProductData = ({ params, data }) => { }); } - setSpecificationsHeader(data); // You can replace console.log with any method to display the content in your header + setSpecificationsHeader(data); // You can replace }; const scrollToSection = (id) => { diff --git a/components/AppsComponent/RootData/page.jsx b/components/AppsComponent/RootData/page.jsx index b11735a..d605c99 100644 --- a/components/AppsComponent/RootData/page.jsx +++ b/components/AppsComponent/RootData/page.jsx @@ -61,8 +61,6 @@ const RootData = ({ children }) => { const router = useRouter(); - console.log("cart", cart); - const AddItemToCart = ( id, persianName, @@ -208,7 +206,7 @@ const RootData = ({ children }) => { top: 0, behavior: "smooth", // Optional: smooth scrolling behavior }); - console.log(); + setProducts(post.products); setStopProducts(true); // Assuming this stops pagination @@ -291,14 +289,11 @@ const RootData = ({ children }) => { }; const fetchOrderBagCheck = async () => { - console.log(cart); const productsToSend = cart.map((item) => ({ productId: item.id, count: parseInt(item.count), })); - console.log(productsToSend); - try { const data = await Chapar.post( `${process.env.NEXT_PUBLIC_API_URL}/order/bag/check`, @@ -387,13 +382,8 @@ const RootData = ({ children }) => { } ); - console.log( - "---------s---------", - `${process.env.NEXT_PUBLIC_API_URL}/marketer/profile` - ); setCooperationSystemProfileData(data); } catch ({ error, status }) { - console.log(status); toast.error(`${error?.response?.data?.message}`, { position: "bottom-right", closeOnClick: true, @@ -414,7 +404,6 @@ const RootData = ({ children }) => { setCooperationSystemProfileContractData(data); } catch ({ error, status }) { - console.log(status); toast.error(`${error?.response?.data?.message}`, { position: "bottom-right", closeOnClick: true, @@ -435,7 +424,6 @@ const RootData = ({ children }) => { setSearchResultData(data); } catch ({ error, status }) { - console.log(status); toast.error(`${error?.response?.data?.message}`, { position: "bottom-right", closeOnClick: true, diff --git a/components/Blog/BlogComponents/Cart.jsx b/components/Blog/BlogComponents/Cart.jsx index 2d6961a..09665e0 100644 --- a/components/Blog/BlogComponents/Cart.jsx +++ b/components/Blog/BlogComponents/Cart.jsx @@ -4,7 +4,6 @@ import PersianNumber from "plugins/PersianNumber"; import React from "react"; const Cart = ({ mainImage, title, categoryName, slug, id, summery }) => { - console.log(process.env.NEXT_PUBLIC_STORAGE_URL + `/Images/Med/` + mainImage); return (
diff --git a/components/Blog/BlogComponents/PaginationBlogs.jsx b/components/Blog/BlogComponents/PaginationBlogs.jsx index bd95caf..7f76cf5 100644 --- a/components/Blog/BlogComponents/PaginationBlogs.jsx +++ b/components/Blog/BlogComponents/PaginationBlogs.jsx @@ -5,7 +5,6 @@ import PersianNumber from "plugins/PersianNumber"; import { useContext, useEffect, useState } from "react"; const PaginationBlogs = ({ totalPage }) => { - console.log("totalPage", totalPage); const CTX = useContext(AppContext); const searchParams = useSearchParams(); const pager = totalPage; @@ -15,7 +14,6 @@ const PaginationBlogs = ({ totalPage }) => { Number(searchParams.get("page")) ? Number(searchParams.get("page")) : 0 ); useEffect(() => { - console.log("pagesssss", Number(searchParams.get("page"))); setCurrentPageIndex( Number(searchParams.get("page")) ? Number(searchParams.get("page")) : 0 ); @@ -85,7 +83,7 @@ const PaginationBlogs = ({ totalPage }) => { const handlePageClick = (pageIndex) => { setCurrentPageIndex(pageIndex); - // console.log("ss", i); + // // CTX.fetchProducts( // pageIndex, // props.id[0] != 0 ? props.id[0] : "", @@ -98,7 +96,6 @@ const PaginationBlogs = ({ totalPage }) => { // true //pagination say or not // ); const nextPage = pageIndex; - console.log("runeed-handleInfiniteNextFetchProducts", nextPage); const params = new URLSearchParams(searchParams.toString()); params.set("page", nextPage); diff --git a/components/Blog/BlogsData/page.jsx b/components/Blog/BlogsData/page.jsx index fad4168..4a744c5 100644 --- a/components/Blog/BlogsData/page.jsx +++ b/components/Blog/BlogsData/page.jsx @@ -9,7 +9,6 @@ import Cart from "../BlogComponents/Cart"; import PaginationBlogs from "../BlogComponents/PaginationBlogs"; const BlogsData = ({ dataCaetgories, data }) => { - console.log(data); const pathname = usePathname(); const searchParams = useSearchParams(); const router = useRouter(); @@ -25,8 +24,6 @@ const BlogsData = ({ dataCaetgories, data }) => { router.push(`${pathname}?${params}`); }; - console.log("dataCaetgories", dataCaetgories); - return (
diff --git a/components/Cards/CardNormal/page.jsx b/components/Cards/CardNormal/page.jsx index 3f77b66..f29cd76 100644 --- a/components/Cards/CardNormal/page.jsx +++ b/components/Cards/CardNormal/page.jsx @@ -13,7 +13,7 @@ import hyphenateString from "plugins/HyphenateString/page"; const CardNormal = ({ data, priority }) => { const CTX = useContext(AppContext); const cart = CTX.state.cart; - console.log(data); + const hyphenatedName = hyphenateString(data.persianName); return ( diff --git a/components/Category/FilterCategory/page.jsx b/components/Category/FilterCategory/page.jsx index eeffc64..32d09c6 100644 --- a/components/Category/FilterCategory/page.jsx +++ b/components/Category/FilterCategory/page.jsx @@ -22,7 +22,7 @@ const FilterCategory = ({ const brands = CTX.state.brands; const pageGetProducts = CTX.state.pageGetProducts; const isFirstRender = useRef(true); - console.log("filter", filter); + const router = useRouter(); const handleCheckboxChange = () => { @@ -39,10 +39,9 @@ const FilterCategory = ({ const handleRangeChange = (values) => { // CTX.setIsRangePrice(true); - console.log(values); - console.log("filters,values", values); + // CTX.setRangePrice(values); - // console.log("rangePrice", rangePrice); + // const params = new URLSearchParams(searchParams.toString()); params.set("minPrice", values[0]); @@ -56,10 +55,10 @@ const FilterCategory = ({ let brandIds = params.get("brandIds") ? Array.from(params.get("brandIds").split(",") ?? []) : []; - // console.log("handleFilterBrand", id, brandIds, brandIds.includes(id)); + // if (brandIds.includes(id)) { brandIds = brandIds.filter((brandId) => brandId !== id); - console.log("handleFilterBrand", brandIds); + if (brandIds.length === 0) { params.delete("brandIds"); router.push(`${pathname}?${params}`); @@ -70,7 +69,7 @@ const FilterCategory = ({ } params.set("brandIds", brandIds.join(",")); params.set("page", "0"); - console.log("handleFilterBrand", id, brandIds); + router.push(`${pathname}?${params}`); // Check if the brand is already selected // const isBrandSelected = selectedBrands.some((brand) => brand.id === id); diff --git a/components/Category/ListProdocts/page.jsx b/components/Category/ListProdocts/page.jsx index ab528ed..630327f 100644 --- a/components/Category/ListProdocts/page.jsx +++ b/components/Category/ListProdocts/page.jsx @@ -15,7 +15,7 @@ const ListProdocts = ({ }) => { const CTX = useContext(AppContext); const products = CTX.state.products; - console.log("products filters", products); + const pager = CTX.state.pager; const stopProducts = CTX.state.stopProducts; const pageGetProducts = CTX.state.pageGetProducts; diff --git a/components/Category/Mobile/Component/SearchSideBar/page.jsx b/components/Category/Mobile/Component/SearchSideBar/page.jsx index 0f7916e..6413aab 100644 --- a/components/Category/Mobile/Component/SearchSideBar/page.jsx +++ b/components/Category/Mobile/Component/SearchSideBar/page.jsx @@ -31,7 +31,6 @@ const SearchSideBar = () => { // Define a function to send the request const sendRequest = async () => { CTX.fetchSearchResult(searchValue); - console.log("Sending request for:", searchValue); }; // Set a timer to send the request after 2000 milliseconds of inactivity diff --git a/components/Category/PaginationCategoory/page.jsx b/components/Category/PaginationCategoory/page.jsx index ef7227f..5be6ee9 100644 --- a/components/Category/PaginationCategoory/page.jsx +++ b/components/Category/PaginationCategoory/page.jsx @@ -14,7 +14,6 @@ const PaginationCategoory = (props) => { Number(searchParams.get("page")) ? Number(searchParams.get("page")) : 0 ); useEffect(() => { - console.log("pagesssss", Number(searchParams.get("page"))); setCurrentPageIndex( Number(searchParams.get("page")) ? Number(searchParams.get("page")) : 0 ); @@ -84,7 +83,7 @@ const PaginationCategoory = (props) => { const handlePageClick = (pageIndex) => { setCurrentPageIndex(pageIndex); - // console.log("ss", i); + // // CTX.fetchProducts( // pageIndex, // props.id[0] != 0 ? props.id[0] : "", @@ -97,7 +96,6 @@ const PaginationCategoory = (props) => { // true //pagination say or not // ); const nextPage = pageIndex; - console.log("runeed-handleInfiniteNextFetchProducts", nextPage); const params = new URLSearchParams(searchParams.toString()); params.set("page", nextPage); diff --git a/components/LandingPage/BeautySection/page.jsx b/components/LandingPage/BeautySection/page.jsx index 56f42c6..e303c6a 100644 --- a/components/LandingPage/BeautySection/page.jsx +++ b/components/LandingPage/BeautySection/page.jsx @@ -33,7 +33,7 @@ const BeautySection = ({ data }) => { console.log("slide change")} + // onSlideChange={() => console.log("slide change")} className="rtl relative mt-5" // dir="rtl" breakpoints={{ diff --git a/components/LandingPage/HomeSection/page.jsx b/components/LandingPage/HomeSection/page.jsx index 49271d0..360b5b3 100644 --- a/components/LandingPage/HomeSection/page.jsx +++ b/components/LandingPage/HomeSection/page.jsx @@ -33,8 +33,8 @@ const HomeSection = ({ data }) => { console.log("slide change")} - onSwiper={(swiper) => console.log(swiper)} + // onSlideChange={() => console.log("slide change")} + // onSwiper={(swiper) => console.log(swiper)} className="rtl relative mt-4" breakpoints={{ 320: { diff --git a/components/LandingPage/SurpriseSection/page.jsx b/components/LandingPage/SurpriseSection/page.jsx index e7a6651..93c0658 100644 --- a/components/LandingPage/SurpriseSection/page.jsx +++ b/components/LandingPage/SurpriseSection/page.jsx @@ -3,7 +3,6 @@ import TimerDown from "@comp/TimerDown/TimerDown"; import { Swiper, SwiperSlide } from "swiper/react"; const SurpriseSection = ({ data }) => { - console.log("sss injaaaha", data); return (
{ console.log("slide change")} - onSwiper={(swiper) => console.log(swiper)} + // onSlideChange={() => + // onSwiper={(swiper) => className="rtl relative mt-5" breakpoints={{ 320: { diff --git a/components/Navbar/SideBarNavBarMobile/page.jsx b/components/Navbar/SideBarNavBarMobile/page.jsx index 7a08359..5658919 100644 --- a/components/Navbar/SideBarNavBarMobile/page.jsx +++ b/components/Navbar/SideBarNavBarMobile/page.jsx @@ -18,10 +18,8 @@ const SideBarNavBarMobile = () => { const searchResultCategoryData = CTX.state.searchResultData.categories; const searchResultProductData = CTX.state.searchResultData.products; - console.log(firstChild); - const closeNavbar = CTX.state.closeNavbar; - console.log("closeNavbar", closeNavbar); + return ( <>
diff --git a/components/Navbar/page.jsx b/components/Navbar/page.jsx index 33f76fd..2c98ce0 100644 --- a/components/Navbar/page.jsx +++ b/components/Navbar/page.jsx @@ -27,8 +27,6 @@ const Navbar = ({ theme }) => { const searchResultCategoryData = CTX.state.searchResultData.categories; const searchResultProductData = CTX.state.searchResultData.products; - console.log("dataNav", dataNav); - const [navItemHover, setNavItemHover] = useState(null); const [isDesktop, setIsDesktop] = useState(null); const [closeNavbar, setClosNavbar] = useState(false); @@ -39,7 +37,6 @@ const Navbar = ({ theme }) => { const handleItemNavber = (index) => { setNavItemHover(index); - console.log("index", index); }; const handleRemoveSearch = () => { @@ -82,7 +79,7 @@ const Navbar = ({ theme }) => { // Define a function to send the request const sendRequest = async () => { CTX.fetchSearchResult(searchValue); - console.log("Sending request for:", searchValue); + setSearchResultShow(true); }; diff --git a/plugins/Gallery/page.jsx b/plugins/Gallery/page.jsx index bba637b..768c684 100644 --- a/plugins/Gallery/page.jsx +++ b/plugins/Gallery/page.jsx @@ -11,7 +11,6 @@ const GalleryBox = ({ file }) => { const isOpenLightBox = CTX.state.isOpenLightBox; - console.log("image", file); return (
@@ -65,7 +64,7 @@ const GalleryBox = ({ file }) => { file && file[0].fileLocation }`} onCloseRequest={() => CTX.setIsOpenLightBox(false)} - onImageLoadError={(e) => console.log(e)} + // onImageLoadError={(e) => imageLoadErrorMessage={"باز نمیشه ؟!!!"} /> )} diff --git a/plugins/RangeSlider/page.jsx b/plugins/RangeSlider/page.jsx index 3b52dd7..48182a8 100644 --- a/plugins/RangeSlider/page.jsx +++ b/plugins/RangeSlider/page.jsx @@ -11,7 +11,6 @@ const RangeSlider = ({ min, max, onChange, values }) => { // left: 0, }; - console.log("slider,values", values, min, max); const trackStyle = [{ backgroundColor: "#2189A8", height: 8 }]; const railStyle = { backgroundColor: "#e6e6e6", height: 8 }; diff --git a/plugins/bottomSheet/BottomSheetSeeOrder.jsx b/plugins/bottomSheet/BottomSheetSeeOrder.jsx index 98dc0df..6bde0a3 100644 --- a/plugins/bottomSheet/BottomSheetSeeOrder.jsx +++ b/plugins/bottomSheet/BottomSheetSeeOrder.jsx @@ -12,7 +12,6 @@ import { toast } from "react-toastify"; import logo from "@img/logo.png"; const BottomSheetSeeOrder = ({ id }) => { - console.log("id", id); const CTX = useContext(AppContext); const [bag, setBag] = useState([]); diff --git a/src/app/blogs/page.jsx b/src/app/blogs/page.jsx index 931ca91..54ded16 100644 --- a/src/app/blogs/page.jsx +++ b/src/app/blogs/page.jsx @@ -1,17 +1,17 @@ import BlogsData from "@comp/Blog/BlogsData/page"; import React from "react"; -async function getData(searchParams) { - // console.log("page , check", params.page); +async function getData(sParams) { + // const res = await fetch( `${process.env.NEXT_PUBLIC_API_URL}/blog?` + - new URLSearchParams({ ...searchParams }) + new URLSearchParams({ ...sParams }) // ?page=${params.page ?? 0} // { cache: "no-cache" } ); const post = await res.json(); - // console.log("dddddddd ", post); + // return post; } @@ -21,14 +21,14 @@ async function getCaetgories() { const post = await res.json(); - // console.log("aaaaaaaaaaaaaaaaaaaa", post); + // return post; } const page = async ({ searchParams }) => { const data = await getData(searchParams); const dataCaetgories = await getCaetgories(); - // console.log("-------------------------------- ", dataCaetgories); + // return ; }; diff --git a/src/app/categories/[...id]/page.jsx b/src/app/categories/[...id]/page.jsx index 3db46e9..ccccfd1 100644 --- a/src/app/categories/[...id]/page.jsx +++ b/src/app/categories/[...id]/page.jsx @@ -48,8 +48,6 @@ const fetchProducts = async (categoryId, searchParams) => { ...params, }; - - const brandIds = brandIdsString?.split(",") ?? []; const brandIdsQuery = brandIds?.length > 0 ? `&brandIds=${brandIds?.join("&brandIds=")}` : ""; @@ -62,7 +60,7 @@ const fetchProducts = async (categoryId, searchParams) => { ); if (!res.ok) return []; const products = await res.json(); - console.log("ppppp", products); + return products; } catch (error) { return []; @@ -71,7 +69,7 @@ const fetchProducts = async (categoryId, searchParams) => { const page = async ({ params, searchParams }) => { const products = await fetchProducts(params?.["id"]?.[0], searchParams); - console.log("filters,page", products); + return (
diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 28f6dab..3f7f04e 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -60,8 +60,8 @@ export const metadata = { export default function RootLayout({ children }) { // if (process.env.NEXT_PUBLIC_IS_DEV === "false") { - // console.log(process.env.NEXT_PUBLIC_IS_DEV === "false" && "PROD"); - // console.log = () => {}; + // + // // } return ( diff --git a/src/app/login/page.jsx b/src/app/login/page.jsx index 598f1ad..0679a24 100644 --- a/src/app/login/page.jsx +++ b/src/app/login/page.jsx @@ -53,8 +53,6 @@ const Login = () => { } ); - console.log(data); - localStorage.setItem("token", "Bearer " + data.access_token); if (data.user.signUpStatus == 1) { diff --git a/src/app/product/[slug]/page.jsx b/src/app/product/[slug]/page.jsx index 35fd66c..382baa5 100644 --- a/src/app/product/[slug]/page.jsx +++ b/src/app/product/[slug]/page.jsx @@ -1,7 +1,6 @@ import { permanentRedirect } from "next/navigation"; export default async function Page({ params: { slug } }) { - console.log("slug", slug); // slug -> id permanentRedirect(`/products/${slug}`, "replace"); } diff --git a/src/app/products/[...id]/page.jsx b/src/app/products/[...id]/page.jsx index 7de6e37..374c83f 100644 --- a/src/app/products/[...id]/page.jsx +++ b/src/app/products/[...id]/page.jsx @@ -14,7 +14,7 @@ export async function generateMetadata({ params }) { data?.product?.files && data?.product?.files[0]?.fileLocation, process.env.STORAGE_URL ); - console.log("dddddd", imageUrl); + const metadataUrl = new URL( `products/${params.id[0]}/${decodedName}`, process.env.NEXT_PUBLIC_APP_URL diff --git a/src/app/profile/address/page.jsx b/src/app/profile/address/page.jsx index 75bddfa..3c4ec4e 100644 --- a/src/app/profile/address/page.jsx +++ b/src/app/profile/address/page.jsx @@ -10,8 +10,6 @@ const Page = () => { const CTX = useContext(AppContext); const addressData = CTX.state.addressData; - console.log(addressData); - useEffect(() => { if (addressData.length <= 0) { CTX.fetchAddressUser(); diff --git a/src/app/profile/orders/page.jsx b/src/app/profile/orders/page.jsx index e6edace..98f0ed8 100644 --- a/src/app/profile/orders/page.jsx +++ b/src/app/profile/orders/page.jsx @@ -17,8 +17,6 @@ const Page = () => { const [bag, setBag] = useState([]); const getStatusDescription = (status) => { - console.log(status); - switch (status) { case 0: return "سبد خرید"; diff --git a/src/app/profile/saleCooperationSystem/page.jsx b/src/app/profile/saleCooperationSystem/page.jsx index 5bd5466..375b08d 100644 --- a/src/app/profile/saleCooperationSystem/page.jsx +++ b/src/app/profile/saleCooperationSystem/page.jsx @@ -65,7 +65,6 @@ const Page = () => { // Convert Persian date to timestamp const timestamp = moment(persianDate, "jYYYY/jM/jD").unix(); setBirthDate(timestamp); - console.log(timestamp); }; const sendInfoUserCooperationSystem = async () => { @@ -110,7 +109,6 @@ const Page = () => { }; useEffect(() => { - console.log("profile.isMarketer", profile); if (profile.isMarketer) { CTX.fetchCooperationSystemProfile(); setStepsaleCooperationSystem(2); diff --git a/src/app/purchase-callback/page.jsx b/src/app/purchase-callback/page.jsx index efd8656..2060277 100644 --- a/src/app/purchase-callback/page.jsx +++ b/src/app/purchase-callback/page.jsx @@ -8,8 +8,6 @@ const Page = () => { const paymentStatus = params.get("paymentStatus"); const factorNumber = params.get("factorNumber"); - console.log("paymentStatus", paymentStatus); - return ( <> {paymentStatus === "true" ? (