refactor: resolve issue fix
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -22,8 +22,13 @@ const ShoppingCart = () => {
|
|||||||
const { formatPrice } = useCurrency();
|
const { formatPrice } = useCurrency();
|
||||||
|
|
||||||
const getCart = async () => {
|
const getCart = async () => {
|
||||||
const response = await authAxios.get("/orders/cart/");
|
token = localStorage.getItem("token")
|
||||||
setCartItems(response.data);
|
if (token == null) {
|
||||||
|
setCartItems([])
|
||||||
|
} else {
|
||||||
|
const response = await authAxios.get("/orders/cart/");
|
||||||
|
setCartItems(response.data);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ const CategoryHero = ({ params }) => {
|
|||||||
objectFit="cover"
|
objectFit="cover"
|
||||||
quality={100}
|
quality={100}
|
||||||
priority
|
priority
|
||||||
className="brightness-75"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ const SubcategoryHero = ({ params }) => {
|
|||||||
objectFit="cover"
|
objectFit="cover"
|
||||||
quality={100}
|
quality={100}
|
||||||
priority
|
priority
|
||||||
className="brightness-75"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user