enhance loyalty card

This commit is contained in:
2025-11-05 19:05:10 +03:00
parent 27f522e75c
commit d7a56ba929
3 changed files with 80 additions and 68 deletions

View File

@@ -19,6 +19,7 @@ const LoyaltyCard = () => {
(restaurant?.customer_loyalty_points || 0) <=
0;
return (
<div className={styles.loyaltyContainer}>
<Card className={styles.loyaltyCard}>
@@ -35,62 +36,64 @@ const LoyaltyCard = () => {
</div>
</div>
)}
<Row
justify="space-between"
align="middle"
style={{ marginBottom: "0.5rem" }}
>
<Col>
<Row align="middle" gutter={[8, 8]}>
<Col>
<LoyaltyIcon className={styles.loyaltyIcon} />
</Col>
<Col>
<ProText style={{ fontSize: "1rem", fontWeight: 400 }}>
{t("menu.loyaltyPoints")}
</ProText>
</Col>
</Row>
<ProText
type="secondary"
strong
style={{
fontSize: "14px",
fontWeight: 700,
position: "relative",
top: -2,
}}
>
{token &&
t("menu.loyaltyDescription", {
value: restaurant?.loyalty_stamps ?? 0,
})}
{!token && (
<div style={{ paddingTop: 4 }}>
<Link
to={`/${subdomain}/login`}
style={{
color: colors.primary,
textDecoration: "underline",
fontSize: "14px",
fontWeight: 400,
padding: "0 4px",
}}
>
{t("menu.joinUs")}
</Link>
<span style={{ fontSize: "14px", color: colors.secondary }}>
{t("menu.joinUsDescription")}
</span>
</div>
)}
</ProText>
</Col>
<Col>
<PresentIcon />
</Col>
</Row>
{token && (
{!isHasLoyaltyGift && (
<Row
justify="space-between"
align="middle"
style={{ marginBottom: "0.5rem" }}
>
<Col>
<Row align="middle" gutter={[8, 8]}>
<Col>
<LoyaltyIcon className={styles.loyaltyIcon} />
</Col>
<Col>
<ProText style={{ fontSize: "1rem", fontWeight: 400 }}>
{t("menu.loyaltyPoints")}
</ProText>
</Col>
</Row>
<ProText
type="secondary"
strong
style={{
fontSize: "14px",
fontWeight: 700,
position: "relative",
top: -2,
}}
>
{token &&
t("menu.loyaltyDescription", {
value: restaurant?.loyalty_stamps ?? 0,
})}
{!token && (
<div style={{ paddingTop: 4 }}>
<Link
to={`/${subdomain}/login`}
style={{
color: colors.primary,
textDecoration: "underline",
fontSize: "14px",
fontWeight: 400,
padding: "0 4px",
}}
>
{t("menu.joinUs")}
</Link>
<span style={{ fontSize: "14px", color: colors.secondary }}>
{t("menu.joinUsDescription")}
</span>
</div>
)}
</ProText>
</Col>
<Col>
<PresentIcon />
</Col>
</Row>
)}
{token && !isHasLoyaltyGift && (
<Row justify="space-between" align="middle">
<Col>
<div className={styles.presentIcon}>