refactor: resolve issue fix

This commit is contained in:
2025-05-14 19:21:59 +05:30
parent a8fecc5f3d
commit 668900661d
4 changed files with 7 additions and 5 deletions

View File

@@ -66,7 +66,6 @@ function ProductDetails({ productId }) {
<span>{formatPrice(totalPrice)}</span> <span>{formatPrice(totalPrice)}</span>
)} )}
</span> </span>
<span className="ml-2 text-sm">INR</span>
</div> </div>
) : ( ) : (
<div className="text-2xl text-[#C17A0F]">Price on request</div> <div className="text-2xl text-[#C17A0F]">Price on request</div>

View File

@@ -22,8 +22,13 @@ const ShoppingCart = () => {
const { formatPrice } = useCurrency(); const { formatPrice } = useCurrency();
const getCart = async () => { const getCart = async () => {
token = localStorage.getItem("token")
if (token == null) {
setCartItems([])
} else {
const response = await authAxios.get("/orders/cart/"); const response = await authAxios.get("/orders/cart/");
setCartItems(response.data); setCartItems(response.data);
}
}; };
useEffect(() => { useEffect(() => {

View File

@@ -38,7 +38,6 @@ const CategoryHero = ({ params }) => {
objectFit="cover" objectFit="cover"
quality={100} quality={100}
priority priority
className="brightness-75"
/> />
</div> </div>

View File

@@ -50,7 +50,6 @@ const SubcategoryHero = ({ params }) => {
objectFit="cover" objectFit="cover"
quality={100} quality={100}
priority priority
className="brightness-75"
/> />
</div> </div>