update restaurant details source & add loyalty icon
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { Button, Card, Col, Row } from "antd";
|
||||
import { Button, Card, Col, Image, Row } from "antd";
|
||||
import LoyaltyIcon from "components/Icons/cart/LoyaltyIcons";
|
||||
import PresentIcon from "components/Icons/cart/PresentIcon";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useGetRestaurantDetailsQuery } from "redux/api/others";
|
||||
import { colors } from "../../ThemeConstants";
|
||||
import ProText from "../ProText";
|
||||
import styles from "./LoyaltyCard.module.css";
|
||||
|
||||
const LoyaltyCard = () => {
|
||||
const { t } = useTranslation();
|
||||
const { data: restaurant } = useGetRestaurantDetailsQuery("595");
|
||||
|
||||
return (
|
||||
<div className={styles.loyaltyContainer}>
|
||||
<Card className={styles.loyaltyCard}>
|
||||
@@ -37,7 +40,9 @@ const LoyaltyCard = () => {
|
||||
top: -2,
|
||||
}}
|
||||
>
|
||||
{t("menu.loyaltyDescription")}
|
||||
{t("menu.loyaltyDescription", {
|
||||
value: restaurant?.loyalty_stamps,
|
||||
})}
|
||||
</ProText>
|
||||
</Col>
|
||||
<Col>
|
||||
@@ -48,11 +53,25 @@ const LoyaltyCard = () => {
|
||||
<Col>
|
||||
<div className={styles.presentIcon}>
|
||||
<div style={{ display: "flex" }}>
|
||||
{["#006347", "#e23000", "#006d34", "#006db7", "#e40000"].map(
|
||||
(color) => (
|
||||
<div key={color} className={styles.presentIconItem} />
|
||||
)
|
||||
)}
|
||||
<Image
|
||||
className={styles.presentIconItem}
|
||||
preview={false}
|
||||
width={32}
|
||||
height={32}
|
||||
src={restaurant?.loyalty_stamp_image}
|
||||
/>
|
||||
<ProText
|
||||
type="secondary"
|
||||
strong
|
||||
style={{
|
||||
fontSize: "1rem",
|
||||
fontWeight: 400,
|
||||
position: "relative",
|
||||
top: 3,
|
||||
}}
|
||||
>
|
||||
x{restaurant?.loyalty_stamps}
|
||||
</ProText>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
|
||||
Reference in New Issue
Block a user