pay flow: initial commit

This commit is contained in:
2025-12-03 01:31:30 +03:00
parent 359d7820dd
commit c43708be6d
12 changed files with 148 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ import CartIcon from "components/Icons/cart/CartIcon";
import ProText from "components/ProText";
import { selectCartItems } from "features/order/orderSlice";
import useBreakPoint from "hooks/useBreakPoint";
import { OrderType } from "pages/checkout/hooks/types";
import { useTranslation } from "react-i18next";
import { Link, useParams } from "react-router-dom";
import { useAppSelector } from "redux/hooks";
@@ -14,9 +15,11 @@ export function MenuFooter() {
const { isMobile, isTablet } = useBreakPoint();
const { t } = useTranslation();
const { subdomain } = useParams();
const { orderType } = useAppSelector((s) => s.order);
const totalItems = items.length;
console.log(orderType);
return (
<>
{(isMobile || isTablet) && (
@@ -37,7 +40,11 @@ export function MenuFooter() {
}}
>
<Link
to={`/${subdomain}/cart`}
to={
orderType === OrderType.Pay
? `/${subdomain}/pay`
: `/${subdomain}/cart`
}
style={{
width: "100%",
padding: "0 16px",