diff --git a/app/[locale]/about/baza/page.tsx b/app/[locale]/about/baza/page.tsx index c80009c..b27f0b7 100644 --- a/app/[locale]/about/baza/page.tsx +++ b/app/[locale]/about/baza/page.tsx @@ -1,5 +1,5 @@ -import NormativBazaPage from "@/pages/about/aboutDetail/baza"; -import { Statistics } from "@/pages/home"; +import NormativBazaPage from "@/components/pages/about/aboutDetail/baza"; +import { Statistics } from "@/components/pages/home"; export default function Baza() { return ( diff --git a/app/[locale]/about/layout.tsx b/app/[locale]/about/layout.tsx index c42e3e9..8a591cc 100644 --- a/app/[locale]/about/layout.tsx +++ b/app/[locale]/about/layout.tsx @@ -1,4 +1,4 @@ -import { AboutBanner } from "@/pages/about"; +import { AboutBanner } from "@/components/pages/about"; import React from "react"; export default function AboutLayout({ diff --git a/app/[locale]/about/notePP/page.tsx b/app/[locale]/about/notePP/page.tsx index 2476bfe..fe4a2cf 100644 --- a/app/[locale]/about/notePP/page.tsx +++ b/app/[locale]/about/notePP/page.tsx @@ -1,5 +1,5 @@ import { useTranslations } from "next-intl"; -import { Guides } from "@/pages/about/aboutDetail/guides"; +import { Guides } from "@/components/pages/about/aboutDetail/guides"; export default function NotePPPage() { const t = useTranslations(); diff --git a/app/[locale]/about/page.tsx b/app/[locale]/about/page.tsx index a42dd99..c8bf8bb 100644 --- a/app/[locale]/about/page.tsx +++ b/app/[locale]/about/page.tsx @@ -1,5 +1,5 @@ -import { Story, WhyChooseUs } from "@/pages/about"; -import { Statistics } from "@/pages/home"; +import { Story, WhyChooseUs } from "@/components/pages/about"; +import { Statistics } from "@/components/pages/home"; export default function Page() { return ( diff --git a/app/[locale]/about/sertificate/page.tsx b/app/[locale]/about/sertificate/page.tsx index 61c7ffb..86bcaa4 100644 --- a/app/[locale]/about/sertificate/page.tsx +++ b/app/[locale]/about/sertificate/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { CertCardSkeleton } from "@/pages/about/aboutDetail/loading/loading"; -import { CertCard } from "@/pages/about/aboutDetail/sertificateCard"; +import { CertCardSkeleton } from "@/components/pages/about/aboutDetail/loading/loading"; +import { CertCard } from "@/components/pages/about/aboutDetail/sertificateCard"; import PaginationLite from "@/components/paginationUI"; import { certs } from "@/lib/demoData"; import httpClient from "@/request/api"; diff --git a/app/[locale]/catalog_page/page.tsx b/app/[locale]/catalog_page/page.tsx index d13149c..bf053ce 100644 --- a/app/[locale]/catalog_page/page.tsx +++ b/app/[locale]/catalog_page/page.tsx @@ -1,7 +1,7 @@ import { Breadcrumb } from "@/components/breadCrumb"; -import Catalog from "@/pages/home/blog/catalog"; -import { ProductBanner } from "@/pages/products"; -import { MainSubCategory } from "@/pages/subCategory"; +import Catalog from "@/components/pages/home/blog/catalog"; +import { ProductBanner } from "@/components/pages/products"; +import { MainSubCategory } from "@/components/pages/subCategory"; export default function Page() { return ( diff --git a/app/[locale]/catalog_page/products/[slug]/page.tsx b/app/[locale]/catalog_page/products/[slug]/page.tsx index ccdb582..56b72f6 100644 --- a/app/[locale]/catalog_page/products/[slug]/page.tsx +++ b/app/[locale]/catalog_page/products/[slug]/page.tsx @@ -1,15 +1,14 @@ "use client"; -import { Features, RightSide, SliderComp } from "@/pages/products"; +import { Features, RightSide, SliderComp } from "@/components/pages/products"; import { useProductPageInfo } from "@/zustand/useProduct"; import { useQuery } from "@tanstack/react-query"; import httpClient from "@/request/api"; import { endPoints } from "@/request/links"; -import { LoadingSkeleton } from "@/pages/products/slug/loading"; -import { EmptyState } from "@/pages/products/slug/empty"; -import { useEffect } from "react"; +import { LoadingSkeleton } from "@/components/pages/products/slug/loading"; +import { EmptyState } from "@/components/pages/products/slug/empty"; import { Breadcrumb } from "@/components/breadCrumb"; -import { useSearchParams } from "next/navigation"; +import { useSearchParams } from "next/dist/client/components/navigation"; // Types interface ProductImage { @@ -33,13 +32,11 @@ interface ProductDetail { } export default function SlugPage() { - const searchParams = useSearchParams(); - const productId = searchParams.get("productId"); + const productZustand = useProductPageInfo((state) => state.product); - const id = productId ? Number(productId) : productZustand.id; const { data: product, isLoading } = useQuery({ queryKey: ["product", productZustand.id], - queryFn: () => httpClient(endPoints.product.detail(id)), + queryFn: () => httpClient(endPoints.product.detail(productZustand.id)), select: (data) => data?.data?.data as ProductDetail, }); diff --git a/app/[locale]/catalog_page/products/page.tsx b/app/[locale]/catalog_page/products/page.tsx index 38359ee..04a4ff6 100644 --- a/app/[locale]/catalog_page/products/page.tsx +++ b/app/[locale]/catalog_page/products/page.tsx @@ -1,6 +1,6 @@ "use client"; import { Breadcrumb } from "@/components/breadCrumb"; -import { ProductBanner, Products } from "@/pages/products"; +import { ProductBanner, Products } from "@/components/pages/products"; import { useSubCategory } from "@/zustand/useSubCategory"; export default function Page() { diff --git a/app/[locale]/catalog_page/subCategory/page.tsx b/app/[locale]/catalog_page/subCategory/page.tsx index edc3940..2582ad5 100644 --- a/app/[locale]/catalog_page/subCategory/page.tsx +++ b/app/[locale]/catalog_page/subCategory/page.tsx @@ -1,6 +1,6 @@ import { Breadcrumb } from "@/components/breadCrumb"; -import { ProductBanner } from "@/pages/products"; -import { MainSubCategory } from "@/pages/subCategory"; +import { ProductBanner } from "@/components/pages/products"; +import { MainSubCategory } from "@/components/pages/subCategory"; export default function Page() { return ( diff --git a/app/[locale]/contact/page.tsx b/app/[locale]/contact/page.tsx index e8097a2..b6fd9e8 100644 --- a/app/[locale]/contact/page.tsx +++ b/app/[locale]/contact/page.tsx @@ -1,4 +1,4 @@ -import { Contact } from "@/pages/contact"; +import { Contact } from "@/components/pages/contact"; export default function Page() { return ; diff --git a/app/[locale]/faq/page.tsx b/app/[locale]/faq/page.tsx index 8e50727..7073d60 100644 --- a/app/[locale]/faq/page.tsx +++ b/app/[locale]/faq/page.tsx @@ -1,4 +1,4 @@ -import { FaqBanner, Togle } from "@/pages/faq"; +import { FaqBanner, Togle } from "@/components/pages/faq"; export default function Page() { return ( diff --git a/app/[locale]/home/page.tsx b/app/[locale]/home/page.tsx index 7e3820f..fef6a32 100644 --- a/app/[locale]/home/page.tsx +++ b/app/[locale]/home/page.tsx @@ -8,7 +8,7 @@ import { Statistics, Testimonial, Video, -} from "@/pages/home"; +} from "@/components/pages/home"; export default function Home() { return ( diff --git a/app/[locale]/services/page.tsx b/app/[locale]/services/page.tsx index 80bc9e6..e865a5a 100644 --- a/app/[locale]/services/page.tsx +++ b/app/[locale]/services/page.tsx @@ -1,9 +1,9 @@ -import { Video } from "@/pages/home"; +import { Video } from "@/components/pages/home"; import { ServiceBanner, ServiceFaq, ServicePageServices, -} from "@/pages/services"; +} from "@/components/pages/services"; export default function Page() { return ( diff --git a/pages/about/aboutBanner.tsx b/components/pages/about/aboutBanner.tsx similarity index 100% rename from pages/about/aboutBanner.tsx rename to components/pages/about/aboutBanner.tsx diff --git a/pages/about/aboutDetail/baza.tsx b/components/pages/about/aboutDetail/baza.tsx similarity index 100% rename from pages/about/aboutDetail/baza.tsx rename to components/pages/about/aboutDetail/baza.tsx diff --git a/pages/about/aboutDetail/card.tsx b/components/pages/about/aboutDetail/card.tsx similarity index 100% rename from pages/about/aboutDetail/card.tsx rename to components/pages/about/aboutDetail/card.tsx diff --git a/pages/about/aboutDetail/guides.tsx b/components/pages/about/aboutDetail/guides.tsx similarity index 100% rename from pages/about/aboutDetail/guides.tsx rename to components/pages/about/aboutDetail/guides.tsx diff --git a/pages/about/aboutDetail/loading/guidLoading.tsx b/components/pages/about/aboutDetail/loading/guidLoading.tsx similarity index 100% rename from pages/about/aboutDetail/loading/guidLoading.tsx rename to components/pages/about/aboutDetail/loading/guidLoading.tsx diff --git a/pages/about/aboutDetail/loading/loading.tsx b/components/pages/about/aboutDetail/loading/loading.tsx similarity index 100% rename from pages/about/aboutDetail/loading/loading.tsx rename to components/pages/about/aboutDetail/loading/loading.tsx diff --git a/pages/about/aboutDetail/normativeCard.tsx b/components/pages/about/aboutDetail/normativeCard.tsx similarity index 100% rename from pages/about/aboutDetail/normativeCard.tsx rename to components/pages/about/aboutDetail/normativeCard.tsx diff --git a/pages/about/aboutDetail/sertificateCard.tsx b/components/pages/about/aboutDetail/sertificateCard.tsx similarity index 100% rename from pages/about/aboutDetail/sertificateCard.tsx rename to components/pages/about/aboutDetail/sertificateCard.tsx diff --git a/pages/about/aboutLine.tsx b/components/pages/about/aboutLine.tsx similarity index 100% rename from pages/about/aboutLine.tsx rename to components/pages/about/aboutLine.tsx diff --git a/pages/about/index.ts b/components/pages/about/index.ts similarity index 100% rename from pages/about/index.ts rename to components/pages/about/index.ts diff --git a/pages/about/innerNavbar.tsx b/components/pages/about/innerNavbar.tsx similarity index 100% rename from pages/about/innerNavbar.tsx rename to components/pages/about/innerNavbar.tsx diff --git a/pages/about/story.tsx b/components/pages/about/story.tsx similarity index 100% rename from pages/about/story.tsx rename to components/pages/about/story.tsx diff --git a/pages/about/whyChooseUs.tsx b/components/pages/about/whyChooseUs.tsx similarity index 100% rename from pages/about/whyChooseUs.tsx rename to components/pages/about/whyChooseUs.tsx diff --git a/pages/contact/contactHeader.tsx b/components/pages/contact/contactHeader.tsx similarity index 100% rename from pages/contact/contactHeader.tsx rename to components/pages/contact/contactHeader.tsx diff --git a/pages/contact/form.tsx b/components/pages/contact/form.tsx similarity index 100% rename from pages/contact/form.tsx rename to components/pages/contact/form.tsx diff --git a/pages/contact/index.ts b/components/pages/contact/index.ts similarity index 100% rename from pages/contact/index.ts rename to components/pages/contact/index.ts diff --git a/pages/contact/main.tsx b/components/pages/contact/main.tsx similarity index 100% rename from pages/contact/main.tsx rename to components/pages/contact/main.tsx diff --git a/pages/contact/maps.tsx b/components/pages/contact/maps.tsx similarity index 100% rename from pages/contact/maps.tsx rename to components/pages/contact/maps.tsx diff --git a/pages/faq/answearQuestions.tsx b/components/pages/faq/answearQuestions.tsx similarity index 100% rename from pages/faq/answearQuestions.tsx rename to components/pages/faq/answearQuestions.tsx diff --git a/pages/faq/faqAccardion.tsx b/components/pages/faq/faqAccardion.tsx similarity index 100% rename from pages/faq/faqAccardion.tsx rename to components/pages/faq/faqAccardion.tsx diff --git a/pages/faq/faqBanner.tsx b/components/pages/faq/faqBanner.tsx similarity index 100% rename from pages/faq/faqBanner.tsx rename to components/pages/faq/faqBanner.tsx diff --git a/pages/faq/index.ts b/components/pages/faq/index.ts similarity index 100% rename from pages/faq/index.ts rename to components/pages/faq/index.ts diff --git a/pages/home/about.tsx b/components/pages/home/about.tsx similarity index 100% rename from pages/home/about.tsx rename to components/pages/home/about.tsx diff --git a/pages/home/banner/banner.tsx b/components/pages/home/banner/banner.tsx similarity index 100% rename from pages/home/banner/banner.tsx rename to components/pages/home/banner/banner.tsx diff --git a/pages/home/banner/loading.tsx b/components/pages/home/banner/loading.tsx similarity index 100% rename from pages/home/banner/loading.tsx rename to components/pages/home/banner/loading.tsx diff --git a/pages/home/banner/slider.tsx b/components/pages/home/banner/slider.tsx similarity index 100% rename from pages/home/banner/slider.tsx rename to components/pages/home/banner/slider.tsx diff --git a/pages/home/blog/blog.tsx b/components/pages/home/blog/blog.tsx similarity index 100% rename from pages/home/blog/blog.tsx rename to components/pages/home/blog/blog.tsx diff --git a/pages/home/blog/catalog.tsx b/components/pages/home/blog/catalog.tsx similarity index 100% rename from pages/home/blog/catalog.tsx rename to components/pages/home/blog/catalog.tsx diff --git a/pages/home/index.ts b/components/pages/home/index.ts similarity index 100% rename from pages/home/index.ts rename to components/pages/home/index.ts diff --git a/pages/home/line.tsx b/components/pages/home/line.tsx similarity index 100% rename from pages/home/line.tsx rename to components/pages/home/line.tsx diff --git a/pages/home/ourService.tsx b/components/pages/home/ourService.tsx similarity index 100% rename from pages/home/ourService.tsx rename to components/pages/home/ourService.tsx diff --git a/pages/home/statistics.tsx b/components/pages/home/statistics.tsx similarity index 100% rename from pages/home/statistics.tsx rename to components/pages/home/statistics.tsx diff --git a/pages/home/testimonal.tsx b/components/pages/home/testimonal.tsx similarity index 100% rename from pages/home/testimonal.tsx rename to components/pages/home/testimonal.tsx diff --git a/pages/home/video.tsx b/components/pages/home/video.tsx similarity index 100% rename from pages/home/video.tsx rename to components/pages/home/video.tsx diff --git a/pages/products/banner.tsx b/components/pages/products/banner.tsx similarity index 100% rename from pages/products/banner.tsx rename to components/pages/products/banner.tsx diff --git a/pages/products/catalog.tsx b/components/pages/products/catalog.tsx similarity index 100% rename from pages/products/catalog.tsx rename to components/pages/products/catalog.tsx diff --git a/pages/products/filter/catalog.tsx b/components/pages/products/filter/catalog.tsx similarity index 100% rename from pages/products/filter/catalog.tsx rename to components/pages/products/filter/catalog.tsx diff --git a/pages/products/filter/category.tsx b/components/pages/products/filter/category.tsx similarity index 100% rename from pages/products/filter/category.tsx rename to components/pages/products/filter/category.tsx diff --git a/pages/products/filter/filter.tsx b/components/pages/products/filter/filter.tsx similarity index 100% rename from pages/products/filter/filter.tsx rename to components/pages/products/filter/filter.tsx diff --git a/pages/products/filter/useCataloghook.ts b/components/pages/products/filter/useCataloghook.ts similarity index 100% rename from pages/products/filter/useCataloghook.ts rename to components/pages/products/filter/useCataloghook.ts diff --git a/pages/products/filter/useCategory.ts b/components/pages/products/filter/useCategory.ts similarity index 100% rename from pages/products/filter/useCategory.ts rename to components/pages/products/filter/useCategory.ts diff --git a/pages/products/index.ts b/components/pages/products/index.ts similarity index 100% rename from pages/products/index.ts rename to components/pages/products/index.ts diff --git a/pages/products/product/mianProduct.tsx b/components/pages/products/product/mianProduct.tsx similarity index 100% rename from pages/products/product/mianProduct.tsx rename to components/pages/products/product/mianProduct.tsx diff --git a/pages/products/product/productCard.tsx b/components/pages/products/product/productCard.tsx similarity index 100% rename from pages/products/product/productCard.tsx rename to components/pages/products/product/productCard.tsx diff --git a/pages/products/product/products.tsx b/components/pages/products/product/products.tsx similarity index 100% rename from pages/products/product/products.tsx rename to components/pages/products/product/products.tsx diff --git a/pages/products/slug/empty.tsx b/components/pages/products/slug/empty.tsx similarity index 100% rename from pages/products/slug/empty.tsx rename to components/pages/products/slug/empty.tsx diff --git a/pages/products/slug/features.tsx b/components/pages/products/slug/features.tsx similarity index 100% rename from pages/products/slug/features.tsx rename to components/pages/products/slug/features.tsx diff --git a/pages/products/slug/loading.tsx b/components/pages/products/slug/loading.tsx similarity index 100% rename from pages/products/slug/loading.tsx rename to components/pages/products/slug/loading.tsx diff --git a/pages/products/slug/rightSide.tsx b/components/pages/products/slug/rightSide.tsx similarity index 100% rename from pages/products/slug/rightSide.tsx rename to components/pages/products/slug/rightSide.tsx diff --git a/pages/products/slug/slider.tsx b/components/pages/products/slug/slider.tsx similarity index 100% rename from pages/products/slug/slider.tsx rename to components/pages/products/slug/slider.tsx diff --git a/pages/services/empty.tsx b/components/pages/services/empty.tsx similarity index 100% rename from pages/services/empty.tsx rename to components/pages/services/empty.tsx diff --git a/pages/services/index.ts b/components/pages/services/index.ts similarity index 100% rename from pages/services/index.ts rename to components/pages/services/index.ts diff --git a/pages/services/loading.tsx b/components/pages/services/loading.tsx similarity index 100% rename from pages/services/loading.tsx rename to components/pages/services/loading.tsx diff --git a/pages/services/serviceBanner.tsx b/components/pages/services/serviceBanner.tsx similarity index 100% rename from pages/services/serviceBanner.tsx rename to components/pages/services/serviceBanner.tsx diff --git a/pages/services/serviceFaq.tsx b/components/pages/services/serviceFaq.tsx similarity index 100% rename from pages/services/serviceFaq.tsx rename to components/pages/services/serviceFaq.tsx diff --git a/pages/services/servicePageServices.tsx b/components/pages/services/servicePageServices.tsx similarity index 100% rename from pages/services/servicePageServices.tsx rename to components/pages/services/servicePageServices.tsx diff --git a/pages/subCategory/body.tsx b/components/pages/subCategory/body.tsx similarity index 100% rename from pages/subCategory/body.tsx rename to components/pages/subCategory/body.tsx diff --git a/pages/subCategory/card.tsx b/components/pages/subCategory/card.tsx similarity index 100% rename from pages/subCategory/card.tsx rename to components/pages/subCategory/card.tsx diff --git a/pages/subCategory/index.ts b/components/pages/subCategory/index.ts similarity index 100% rename from pages/subCategory/index.ts rename to components/pages/subCategory/index.ts