diff --git a/01-frontend/public/locales/de/translation.json b/01-frontend/public/locales/de/translation.json
index 3ecb10b..f090ece 100644
--- a/01-frontend/public/locales/de/translation.json
+++ b/01-frontend/public/locales/de/translation.json
@@ -94,5 +94,6 @@
"thanksForRating": "Vielen Dank für die Bewertung!",
"telephone": "Telefon",
"basketEmpty": "Der Warenkorb ist leer.",
- "login": "Anmelden"
+ "login": "Anmelden",
+ "total": "Insgesamt"
}
diff --git a/01-frontend/public/locales/en/translation.json b/01-frontend/public/locales/en/translation.json
index c9371c8..06f0274 100644
--- a/01-frontend/public/locales/en/translation.json
+++ b/01-frontend/public/locales/en/translation.json
@@ -94,5 +94,6 @@
"thanksForRating": "Thank you for rating!",
"telephone": "Telephone",
"basketEmpty": "The shopping cart is empty.",
- "login": "Login"
+ "login": "Login",
+ "total": "Total"
}
diff --git a/01-frontend/src/pages/Payment.tsx b/01-frontend/src/pages/Payment.tsx
index 8baff7d..bd2eaf7 100644
--- a/01-frontend/src/pages/Payment.tsx
+++ b/01-frontend/src/pages/Payment.tsx
@@ -18,6 +18,7 @@ import React, { useState } from 'react';
import { useTranslation } from "react-i18next";
import { useNavigate } from 'react-router-dom';
import { useBasket } from '../helper/BasketProvider';
+import Item from '../components/Item';
type ShippingDetails = {
firstName: string;
@@ -29,6 +30,10 @@ type ShippingDetails = {
country: string;
};
+function getDiscountedPrice(item: Item): number {
+ return (item.price100 / 100 * (100-item.discount100)/100);
+}
+
export default function Payment() {
@@ -102,9 +107,14 @@ export default function Payment() {
{basket.map((item) => (
+ {item.item.discount100 > 0 ? {-item.item.discount100}% : ""}
+