cart: enhancements

This commit is contained in:
2025-12-31 00:10:09 +03:00
parent 5d523e2508
commit 7119ead8c2
5 changed files with 205 additions and 177 deletions

View File

@@ -7,6 +7,7 @@ import { useAppSelector } from "redux/hooks";
import { selectCart } from "features/order/orderSlice";
import { useNavigate, useParams } from "react-router-dom";
import { useGetOrderDetailsQuery } from "redux/api/others";
import BackIcon from "components/Icons/BackIcon";
export default function BriefMenuCard() {
const { t } = useTranslation();
@@ -24,6 +25,7 @@ export default function BriefMenuCard() {
},
);
const totalItems = items.length || orderDetails?.orderItems.length;
const { isRTL } = useAppSelector((state) => state.locale);
return (
<>
@@ -53,12 +55,18 @@ export default function BriefMenuCard() {
cursor: "pointer",
}}
>
<span style={{ marginRight: 5, position: "relative", top: 3.5 }}>
<span
style={{
[isRTL ? "marginLeft" : "marginRight"]: 5,
position: "relative",
top: 3.5,
}}
>
<InvoiceIcon />
</span>
{t("checkout.viewOrder")} ( {totalItems} {t("cart.items")} )
</ProText>
<NextIcon />
{isRTL ? <BackIcon /> : <NextIcon />}
</div>
</ProInputCard>
</>