implement scheduled order type
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
import { Button, Form, Input, message } from "antd";
|
||||
import { CouponBottomSheet } from "components/CustomBottomSheet/CouponBottomSheet.tsx";
|
||||
import { useAppSelector, useAppDispatch } from "redux/hooks.ts";
|
||||
import { selectCart, updateCoupon } from "features/order/orderSlice.ts";
|
||||
import { useState } from "react";
|
||||
import { message, Input, Button } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { CouponDialog } from "components/CustomBottomSheet/CouponDialog.tsx";
|
||||
import CouponHeartIcon from "components/Icons/cart/CouponHeart.tsx";
|
||||
import DonateIcon from "components/Icons/cart/DonateIcon.tsx";
|
||||
import ProInputCard from "components/ProInputCard/ProInputCard.tsx";
|
||||
import ProText from "components/ProText.tsx";
|
||||
import { colors } from "ThemeConstants.ts";
|
||||
import DonateIcon from "components/Icons/cart/DonateIcon.tsx";
|
||||
import CouponHeartIcon from "components/Icons/cart/CouponHeart.tsx";
|
||||
import styles from "pages/cart/cart.module.css";
|
||||
import { CouponDialog } from "components/CustomBottomSheet/CouponDialog.tsx";
|
||||
import { selectCart, updateCoupon } from "features/order/orderSlice.ts";
|
||||
import useBreakPoint from "hooks/useBreakPoint.ts";
|
||||
import styles from "pages/cart/cart.module.css";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAppDispatch, useAppSelector } from "redux/hooks.ts";
|
||||
import { colors } from "ThemeConstants.ts";
|
||||
|
||||
type Props = {};
|
||||
export default function CouponCard({}: Props) {
|
||||
export default function CouponCard() {
|
||||
const { t } = useTranslation();
|
||||
const dispatch = useAppDispatch();
|
||||
const { coupon } = useAppSelector(selectCart);
|
||||
@@ -57,27 +56,34 @@ export default function CouponCard({}: Props) {
|
||||
<DonateIcon />
|
||||
</div>
|
||||
}
|
||||
dividerStyle={{ margin: "5px 0 0 0" }}
|
||||
>
|
||||
<Input
|
||||
placeholder={t("cart.couponCode")}
|
||||
size="large"
|
||||
autoFocus={false}
|
||||
style={{ padding: "7px 11px", height: 50 }}
|
||||
suffix={
|
||||
<Button
|
||||
style={{
|
||||
width: 100,
|
||||
height: 32,
|
||||
borderRadius: 100,
|
||||
backgroundColor: "black",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
{t("cart.apply")}
|
||||
<CouponHeartIcon className={styles.couponApplyIcon} />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
<Form.Item
|
||||
label={t("cart.couponCode")}
|
||||
name="coupon"
|
||||
style={{ position: "relative", top: -5 }}
|
||||
>
|
||||
<Input
|
||||
placeholder={t("cart.couponCode")}
|
||||
size="large"
|
||||
autoFocus={false}
|
||||
style={{ padding: "7px 11px", height: 50 }}
|
||||
suffix={
|
||||
<Button
|
||||
style={{
|
||||
width: 100,
|
||||
height: 32,
|
||||
borderRadius: 100,
|
||||
backgroundColor: "black",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
{t("cart.apply")}
|
||||
<CouponHeartIcon className={styles.couponApplyIcon} />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
</ProInputCard>
|
||||
{isDesktop ? (
|
||||
<CouponDialog
|
||||
|
||||
Reference in New Issue
Block a user