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