diff --git a/src/layouts/app/styles.css b/src/layouts/app/styles.css index f7bf0b7..ad114a7 100644 --- a/src/layouts/app/styles.css +++ b/src/layouts/app/styles.css @@ -11,7 +11,7 @@ z-index: 1; gap: 4px; transition: all 0.25s; - height: 8vh; + height: 70px; } .user-icon { diff --git a/src/pages/cart/cart.module.css b/src/pages/cart/cart.module.css index 61c41d7..192b62a 100644 --- a/src/pages/cart/cart.module.css +++ b/src/pages/cart/cart.module.css @@ -86,13 +86,6 @@ min-height: 100vh; } -.desktopMainContent { - border-radius: 24px; - padding: 32px; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); - border: 1px solid rgba(0, 0, 0, 0.06); -} - .desktopSectionHeader { border-bottom: 1px solid var(--border); } @@ -116,7 +109,7 @@ } .desktopCartItemsSection { - margin-bottom: 16px; + margin-top: 40px; } .desktopCartItems { @@ -126,7 +119,7 @@ } .desktopCartItem { - border:none; + border: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; } @@ -264,6 +257,7 @@ display: flex; flex-direction: column; gap: 16px; + padding-top: 20px; } .desktopSidebarCard { @@ -510,11 +504,7 @@ @media (min-width: 1440px) { .desktopCartContainer { max-width: 100vw; - padding: 48px 32px; - } - - .desktopMainContent { - padding: 40px; + padding: 0 32px 32px 32px; } .desktopRecommendationsGrid { @@ -592,7 +582,6 @@ box-shadow: none; } - .desktopMainContent, .desktopSidebarCard { box-shadow: none; border: 1px solid #000; diff --git a/src/pages/cart/components/CartDesktopLayout.tsx b/src/pages/cart/components/CartDesktopLayout.tsx index b5e2cf4..ea05dc2 100644 --- a/src/pages/cart/components/CartDesktopLayout.tsx +++ b/src/pages/cart/components/CartDesktopLayout.tsx @@ -1,4 +1,4 @@ -import { Button, Card, Col, Divider, Row } from "antd"; +import { Card, Col, Divider, Row } from "antd"; import ArabicPrice from "components/ArabicPrice"; import CartActionsButtons from "components/CartActionsButtons/CartActionsButtons.tsx"; import EmptyOrdersIcon from "components/Icons/EmptyOrdersIcon.tsx"; @@ -6,7 +6,6 @@ import ImageWithFallback from "components/ImageWithFallback"; import ProText from "components/ProText.tsx"; import ProTitle from "components/ProTitle.tsx"; import styles from "pages/cart/cart.module.css"; -import { Link, useParams } from "react-router-dom"; import { colors } from "ThemeConstants.ts"; import { CartItem } from "utils/types/appTypes.ts"; @@ -25,7 +24,6 @@ import CartFooter from "./cartFooter/CartFooter"; export default function CartDesktopLayout() { const { t } = useTranslation(); - const { id } = useParams(); const { items } = useAppSelector(selectCart); const orderType = localStorage.getItem("orderType"); @@ -36,143 +34,124 @@ export default function CartDesktopLayout() { {/* Main Content Column */} -
- {/*
- -
*/} + {/* Cart Items Section */} + +
+ + {t("cart.yourOrder")} + +
- {/* Cart Items Section */} - -
+ {items.length === 0 ? ( +
+
+ +
- {t("cart.yourOrder")} + {t("common.emptyCart")} + + {t("cart.emptyCartMessage")} +
- - {items.length === 0 ? ( -
-
- -
- + {items.map((item, index) => ( + - {t("common.emptyCart")} - - - {t("cart.emptyCartMessage")} - - - - -
- ) : ( -
- {items.map((item, index) => ( - - - -
- -
- + +
+ +
+ - -
- - {item.name} - - - {item.description} + +
+ + {item.name} + + + {item.description} + +
+ + -
- - - -
- +
+ - -
- -
- - - {index !== items.length - 1 && ( - - )} - - ))} -
- )} -
+ +
+ +
+ + + {index !== items.length - 1 && ( + + )} + + ))} +
+ )} + - -
+ {/* Sidebar Column */} diff --git a/src/pages/cart/components/timeEstimate/TimeEstimateCard.tsx b/src/pages/cart/components/timeEstimate/TimeEstimateCard.tsx index 43cec61..2162897 100644 --- a/src/pages/cart/components/timeEstimate/TimeEstimateCard.tsx +++ b/src/pages/cart/components/timeEstimate/TimeEstimateCard.tsx @@ -1,13 +1,12 @@ -import ProRatioGroups from "components/ProRatioGroups/ProRatioGroups.tsx"; import ProInputCard from "components/ProInputCard/ProInputCard.tsx"; +import ProRatioGroups from "components/ProRatioGroups/ProRatioGroups.tsx"; +import { selectCart, updateEstimateTime } from "features/order/orderSlice.ts"; +import useBreakPoint from "hooks/useBreakPoint.ts"; +import { BottomSheet } from "pages/cart/components/timeEstimate/BottomSheet.tsx"; +import { Dialog } from "pages/cart/components/timeEstimate/Dialog.tsx"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { updateEstimateTime, selectCart } from "features/order/orderSlice.ts"; -import { message } from "antd"; -import { BottomSheet } from "pages/cart/components/timeEstimate/BottomSheet.tsx"; import { useAppDispatch, useAppSelector } from "redux/hooks.ts"; -import useBreakPoint from "hooks/useBreakPoint.ts"; -import { Dialog } from "pages/cart/components/timeEstimate/Dialog.tsx"; export default function TimeEstimateCard() { const { t } = useTranslation(); @@ -19,7 +18,6 @@ export default function TimeEstimateCard() { const handleEstimateTimeSave = (date: Date, time: string) => { dispatch(updateEstimateTime({ date, time })); - message.success(t("cart.estimateTime") + " " + t("updatedSuccessfully")); }; const handleEstimateTimeClose = () => {