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>
<span className="ml-2 text-sm">INR</span>
</div>
) : (
<div className="text-2xl text-[#C17A0F]">Price on request</div>

View File

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

View File

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

View File

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