cart: fix translations and link
This commit is contained in:
@@ -6,7 +6,7 @@ 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 } from "react-router-dom";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import { colors } from "ThemeConstants.ts";
|
||||
import { CartItem } from "utils/types/appTypes.ts";
|
||||
|
||||
@@ -25,7 +25,9 @@ import CartFooter from "./cartFooter/CartFooter";
|
||||
|
||||
export default function CartDesktopLayout() {
|
||||
const { t } = useTranslation();
|
||||
const { id } = useParams();
|
||||
const { items } = useAppSelector(selectCart);
|
||||
|
||||
const orderType = localStorage.getItem("orderType");
|
||||
|
||||
return (
|
||||
@@ -59,15 +61,19 @@ export default function CartDesktopLayout() {
|
||||
level={4}
|
||||
style={{ marginBottom: "16px", color: colors.primary }}
|
||||
>
|
||||
{t("emptyCart")}
|
||||
{t("common.emptyCart")}
|
||||
</ProTitle>
|
||||
<ProText
|
||||
type="secondary"
|
||||
style={{ marginBottom: "24px", fontSize: "16px" }}
|
||||
>
|
||||
{t("emptyCartMessage")}
|
||||
{t("cart.emptyCartMessage")}
|
||||
</ProText>
|
||||
<Link to="/menu">
|
||||
<Link
|
||||
to={`/${id}/menu?${
|
||||
orderType ? `orderType=${orderType}` : ""
|
||||
}`}
|
||||
>
|
||||
<Button
|
||||
type="primary"
|
||||
size="large"
|
||||
|
||||
Reference in New Issue
Block a user