updated compoennt file structure
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AboutBanner } from "@/pages/about";
|
||||
import { AboutBanner } from "@/components/pages/about";
|
||||
import React from "react";
|
||||
|
||||
export default function AboutLayout({
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Contact } from "@/pages/contact";
|
||||
import { Contact } from "@/components/pages/contact";
|
||||
|
||||
export default function Page() {
|
||||
return <Contact />;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FaqBanner, Togle } from "@/pages/faq";
|
||||
import { FaqBanner, Togle } from "@/components/pages/faq";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Statistics,
|
||||
Testimonial,
|
||||
Video,
|
||||
} from "@/pages/home";
|
||||
} from "@/components/pages/home";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user