updated compoennt file structure
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import NormativBazaPage from "@/pages/about/aboutDetail/baza";
|
import NormativBazaPage from "@/components/pages/about/aboutDetail/baza";
|
||||||
import { Statistics } from "@/pages/home";
|
import { Statistics } from "@/components/pages/home";
|
||||||
|
|
||||||
export default function Baza() {
|
export default function Baza() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AboutBanner } from "@/pages/about";
|
import { AboutBanner } from "@/components/pages/about";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function AboutLayout({
|
export default function AboutLayout({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { Guides } from "@/pages/about/aboutDetail/guides";
|
import { Guides } from "@/components/pages/about/aboutDetail/guides";
|
||||||
|
|
||||||
export default function NotePPPage() {
|
export default function NotePPPage() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Story, WhyChooseUs } from "@/pages/about";
|
import { Story, WhyChooseUs } from "@/components/pages/about";
|
||||||
import { Statistics } from "@/pages/home";
|
import { Statistics } from "@/components/pages/home";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { CertCardSkeleton } from "@/pages/about/aboutDetail/loading/loading";
|
import { CertCardSkeleton } from "@/components/pages/about/aboutDetail/loading/loading";
|
||||||
import { CertCard } from "@/pages/about/aboutDetail/sertificateCard";
|
import { CertCard } from "@/components/pages/about/aboutDetail/sertificateCard";
|
||||||
import PaginationLite from "@/components/paginationUI";
|
import PaginationLite from "@/components/paginationUI";
|
||||||
import { certs } from "@/lib/demoData";
|
import { certs } from "@/lib/demoData";
|
||||||
import httpClient from "@/request/api";
|
import httpClient from "@/request/api";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Breadcrumb } from "@/components/breadCrumb";
|
import { Breadcrumb } from "@/components/breadCrumb";
|
||||||
import Catalog from "@/pages/home/blog/catalog";
|
import Catalog from "@/components/pages/home/blog/catalog";
|
||||||
import { ProductBanner } from "@/pages/products";
|
import { ProductBanner } from "@/components/pages/products";
|
||||||
import { MainSubCategory } from "@/pages/subCategory";
|
import { MainSubCategory } from "@/components/pages/subCategory";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Features, RightSide, SliderComp } from "@/pages/products";
|
import { Features, RightSide, SliderComp } from "@/components/pages/products";
|
||||||
import { useProductPageInfo } from "@/zustand/useProduct";
|
import { useProductPageInfo } from "@/zustand/useProduct";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import httpClient from "@/request/api";
|
import httpClient from "@/request/api";
|
||||||
import { endPoints } from "@/request/links";
|
import { endPoints } from "@/request/links";
|
||||||
import { LoadingSkeleton } from "@/pages/products/slug/loading";
|
import { LoadingSkeleton } from "@/components/pages/products/slug/loading";
|
||||||
import { EmptyState } from "@/pages/products/slug/empty";
|
import { EmptyState } from "@/components/pages/products/slug/empty";
|
||||||
import { useEffect } from "react";
|
|
||||||
import { Breadcrumb } from "@/components/breadCrumb";
|
import { Breadcrumb } from "@/components/breadCrumb";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/dist/client/components/navigation";
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
interface ProductImage {
|
interface ProductImage {
|
||||||
@@ -33,13 +32,11 @@ interface ProductDetail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function SlugPage() {
|
export default function SlugPage() {
|
||||||
const searchParams = useSearchParams();
|
|
||||||
const productId = searchParams.get("productId");
|
|
||||||
const productZustand = useProductPageInfo((state) => state.product);
|
const productZustand = useProductPageInfo((state) => state.product);
|
||||||
const id = productId ? Number(productId) : productZustand.id;
|
|
||||||
const { data: product, isLoading } = useQuery({
|
const { data: product, isLoading } = useQuery({
|
||||||
queryKey: ["product", productZustand.id],
|
queryKey: ["product", productZustand.id],
|
||||||
queryFn: () => httpClient(endPoints.product.detail(id)),
|
queryFn: () => httpClient(endPoints.product.detail(productZustand.id)),
|
||||||
select: (data) => data?.data?.data as ProductDetail,
|
select: (data) => data?.data?.data as ProductDetail,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { Breadcrumb } from "@/components/breadCrumb";
|
import { Breadcrumb } from "@/components/breadCrumb";
|
||||||
import { ProductBanner, Products } from "@/pages/products";
|
import { ProductBanner, Products } from "@/components/pages/products";
|
||||||
import { useSubCategory } from "@/zustand/useSubCategory";
|
import { useSubCategory } from "@/zustand/useSubCategory";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Breadcrumb } from "@/components/breadCrumb";
|
import { Breadcrumb } from "@/components/breadCrumb";
|
||||||
import { ProductBanner } from "@/pages/products";
|
import { ProductBanner } from "@/components/pages/products";
|
||||||
import { MainSubCategory } from "@/pages/subCategory";
|
import { MainSubCategory } from "@/components/pages/subCategory";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Contact } from "@/pages/contact";
|
import { Contact } from "@/components/pages/contact";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <Contact />;
|
return <Contact />;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { FaqBanner, Togle } from "@/pages/faq";
|
import { FaqBanner, Togle } from "@/components/pages/faq";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Statistics,
|
Statistics,
|
||||||
Testimonial,
|
Testimonial,
|
||||||
Video,
|
Video,
|
||||||
} from "@/pages/home";
|
} from "@/components/pages/home";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Video } from "@/pages/home";
|
import { Video } from "@/components/pages/home";
|
||||||
import {
|
import {
|
||||||
ServiceBanner,
|
ServiceBanner,
|
||||||
ServiceFaq,
|
ServiceFaq,
|
||||||
ServicePageServices,
|
ServicePageServices,
|
||||||
} from "@/pages/services";
|
} from "@/components/pages/services";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user