fixed some bugs
This commit is contained in:
@@ -304,11 +304,11 @@ const Checkout = ({ cartItems, shippingPrice, productIds, onBackToCart, onPlaceO
|
||||
"checkout.Delivery_is_carried_out_in_the_cities_of_Ashgabat_Buzmein_and_Anau"
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
{/* <li>
|
||||
{t(
|
||||
"checkout.The_minimum_order_amount_must_be_at_least_50_manat_for_orders_over_150_manat_delivery_is_free"
|
||||
)}
|
||||
</li>
|
||||
</li> */}
|
||||
<li>
|
||||
{t(
|
||||
"checkout.After_you_place_an_order_on_the_website_the_operator_will_call_you_to_confirm_the_order_for_regular_customers_confirmation_is_carried_out_automatically_at_their_request"
|
||||
|
||||
@@ -8,7 +8,7 @@ const Layout = () => {
|
||||
return (
|
||||
<>
|
||||
<Navbar />
|
||||
<NavbarDown/>
|
||||
{/* <NavbarDown/> */}
|
||||
<main>
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
background-color: #fff;
|
||||
margin-bottom: 1px;
|
||||
border-bottom: 3px solid #f3f4f6;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.btn{
|
||||
@@ -38,7 +41,7 @@
|
||||
background-color: #ffffff;
|
||||
max-width: 1366px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
top: 80px; // navbarUp yüksekliği kadar
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
padding-left: 1.375rem;
|
||||
@@ -96,6 +99,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.navLinks {
|
||||
width: 100%;
|
||||
}
|
||||
.navLinks ul {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
|
||||
@@ -135,7 +135,7 @@ const NavbarDown = () => {
|
||||
];
|
||||
|
||||
return (
|
||||
<header className={styles.navbar}>
|
||||
<header className={styles.navbar} style={{ width: "100%" }}>
|
||||
<div className={styles.navbarDown} style={{ position: "sticky" }}>
|
||||
<nav className={styles.navLinks}>
|
||||
<ul>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useTranslation } from "react-i18next";
|
||||
import tm from "../../assets/tm.png";
|
||||
import ru from "../../assets/ru.png";
|
||||
import en from "../../assets/en.png";
|
||||
|
||||
import NavbarDown from "./NavbarDown";
|
||||
const Navbar = () => {
|
||||
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
@@ -92,6 +92,7 @@ const Navbar = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<NavbarDown />
|
||||
</header>
|
||||
<Modal
|
||||
open={isModalVisible}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
border-radius: 8px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
z-index: 1;
|
||||
@media screen and (max-width: 426px) {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -225,6 +225,12 @@ const ProductCard = ({
|
||||
|
||||
const { name, price_amount, old_price_amount, media = [], reviews } = product;
|
||||
|
||||
// Hesaplanmış indirim oranı
|
||||
let calculatedDiscount = null;
|
||||
if (!product.discount && old_price_amount && price_amount && old_price_amount > price_amount) {
|
||||
calculatedDiscount = Math.round(((old_price_amount - price_amount) / old_price_amount) * 100);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
@@ -234,8 +240,10 @@ const ProductCard = ({
|
||||
onMouseLeave={() => setIsHovered(false)}
|
||||
>
|
||||
<div className={styles.imageContainer}>
|
||||
{product.discount && (
|
||||
<span className={styles.discountBadge}>-{product.discount}%</span>
|
||||
{(product.discount || calculatedDiscount) && (
|
||||
<span className={styles.discountBadge}>
|
||||
-{product.discount ? product.discount : calculatedDiscount}%
|
||||
</span>
|
||||
)}
|
||||
{product.stock === 0 && (
|
||||
<span className={`${styles.discountBadge} ${styles.outOfStock}`}>
|
||||
|
||||
Reference in New Issue
Block a user