added k8s specific changes

This commit is contained in:
2026-03-17 10:19:07 +05:30
parent 4e5af08bc1
commit 39770839d0
13 changed files with 37 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
import { useParams } from "react-router-dom";
import { useEffect } from "react";
import { useDispatch } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import Breadcrumb from "../../components/ui/Breadcrumb";
import ProductImages from "./ProductImages";
import ProductInfo from "./ProductInfo";
@@ -19,9 +19,10 @@ import RecommendedForYou from "../home/RecommendedForYou/RecommendedForYou";
const ProductDetails = () => {
const { slug } = useParams();
const dispatch = useDispatch();
const token = useSelector((state) => state.auth.token);
const { data, isLoading, isError } = useGetProductBySlugQuery(slug);
const { data: wishlistData } = useGetWishlistQuery();
const { data: wishlistData } = useGetWishlistQuery(undefined, { skip: !token });
const [addToWishlist] = useAddToWishlistMutation();
const [removeFromWishlist] = useRemoveFromWishlistMutation();