cart: enhance order summary styles

This commit is contained in:
2025-10-11 11:07:40 +03:00
parent 3ea54c0b3d
commit 0035a84dea
4 changed files with 67 additions and 102 deletions

View File

@@ -10,7 +10,6 @@ import styles from "./OrderSummary.module.css";
export default function OrderSummary() {
const { t } = useTranslation();
const subtotal = useAppSelector(selectCartTotal);
const { isRTL } = useAppSelector((state) => state.locale);
const tax = subtotal * 0.1; // 10% tax
const total = subtotal + tax;
@@ -21,39 +20,21 @@ export default function OrderSummary() {
<Divider style={{ margin: "15px 0 15px 0" }} />
<Space direction="vertical" style={{ width: "100%" }}>
<div className={styles.summaryRow}>
<ProText style={{ color: "rgba(67, 78, 92, 1)" }}>
{t("cart.basketTotal")}
</ProText>
<ArabicPrice
price={subtotal}
style={{ color: "rgba(67, 78, 92, 1)" }}
/>
<ProText type="secondary">{t("cart.basketTotal")}</ProText>
<ArabicPrice price={subtotal} />
</div>
<div className={styles.summaryRow}>
<ProText style={{ color: "rgba(67, 78, 92, 1)" }}>
{t("cart.discount")}
</ProText>
<ArabicPrice
price={0}
style={{ color: "rgba(67, 78, 92, 1)" }}
/>
<ProText type="secondary">{t("cart.discount")}</ProText>
<ArabicPrice price={0} />
</div>
<div className={styles.summaryRow}>
<ProText style={{ color: "rgba(67, 78, 92, 1)" }}>
{t("cart.riderTip")}
</ProText>
<ArabicPrice
price={tax}
style={{ color: "rgba(67, 78, 92, 1)" }}
/>
<ProText type="secondary">{t("cart.riderTip")}</ProText>
<ArabicPrice price={tax} />
</div>
<Divider className={styles.summaryDivider} />
<div className={`${styles.summaryRow} ${styles.totalRow}`}>
<ProText strong>{t("cart.totalAmount")}</ProText>
<ArabicPrice
price={total}
strong
/>
<ProText strong type="secondary">{t("cart.totalAmount")}</ProText>
<ArabicPrice price={total} strong />
</div>
</Space>
</Card>