vreadCrumb added
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import httpClient from "@/request/api";
|
||||
import { endPoints } from "@/request/links";
|
||||
import { useEffect } from "react";
|
||||
import CatalogCard from "../../products/catalog";
|
||||
import CatalogCardSkeleton from "@/components/loadingSkleton";
|
||||
import EmptyData from "@/components/EmptyData";
|
||||
import { getRouteLang } from "@/request/getLang";
|
||||
import { CategoryType } from "@/lib/types";
|
||||
|
||||
export default function Catalog() {
|
||||
export default function Catalog() {
|
||||
const language = getRouteLang();
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ["category", language],
|
||||
|
||||
@@ -84,8 +84,8 @@ export default function CatalogCard({
|
||||
};
|
||||
|
||||
const navigateLink = have_sub_category
|
||||
? `/${locale}/subCategory?category=${id}`
|
||||
: `/${locale}/products?category=${id}`;
|
||||
? `/${locale}/catalog_page/subCategory?category=${id}`
|
||||
: `/${locale}/catalog_page/products?category=${id}`;
|
||||
|
||||
return (
|
||||
<Link
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function ProductCard({
|
||||
const locale = useLocale();
|
||||
|
||||
return (
|
||||
<Link href={`/${locale}/products/${slug}`} onClick={getProduct}>
|
||||
<Link href={`/${locale}/catalog_page/products/${slug}`} onClick={getProduct}>
|
||||
<article className="group transition-all duration-300 hover:cursor-pointer max-sm:max-w-100 max-sm:mx-auto max-sm:w-full">
|
||||
{/* Image Container */}
|
||||
<div className="relative rounded-2xl h-45 sm:h-55 md:h-65 lg:w-[95%] w-[90%] mx-auto overflow-hidden">
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function Card({
|
||||
image,
|
||||
category,
|
||||
});
|
||||
router.push(`/${locale}/products`);
|
||||
router.push(`/${locale}/catalog_page/products`);
|
||||
};
|
||||
return (
|
||||
<Link href="#" onClick={handleClick}>
|
||||
|
||||
Reference in New Issue
Block a user