From b3ef4ba144d6a4a8c158a3bd59b1c2aac36b53cd Mon Sep 17 00:00:00 2001 From: Tim <47184194+imgde@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:57:11 +0200 Subject: [PATCH] Improve loading speed immensely --- 01-frontend/src/helper/homepage/ItemCard.tsx | 2 +- 01-frontend/src/helper/productpage/ProductInfo.tsx | 2 +- 01-frontend/src/helper/productpage/RatingCard.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/01-frontend/src/helper/homepage/ItemCard.tsx b/01-frontend/src/helper/homepage/ItemCard.tsx index 9fb6c8f..b9d6e13 100644 --- a/01-frontend/src/helper/homepage/ItemCard.tsx +++ b/01-frontend/src/helper/homepage/ItemCard.tsx @@ -63,7 +63,7 @@ export default function ItemCard({ item }: { item: Item }) { {item.name} - + {(item.price100 / 100 * (1 - item.discount100 / 100)).toFixed(2)} € diff --git a/01-frontend/src/helper/productpage/ProductInfo.tsx b/01-frontend/src/helper/productpage/ProductInfo.tsx index 877e76a..642cd76 100644 --- a/01-frontend/src/helper/productpage/ProductInfo.tsx +++ b/01-frontend/src/helper/productpage/ProductInfo.tsx @@ -107,7 +107,7 @@ export default function ProductInfo({ item }: { item: Item }) { - + {item.rating > 0 ? `(${item.rating / 2} / 5)` : t('noRatingsYet')} diff --git a/01-frontend/src/helper/productpage/RatingCard.tsx b/01-frontend/src/helper/productpage/RatingCard.tsx index b40edc5..99a5207 100644 --- a/01-frontend/src/helper/productpage/RatingCard.tsx +++ b/01-frontend/src/helper/productpage/RatingCard.tsx @@ -45,7 +45,7 @@ export default function RatingCard(ratingType: RatingType) { name="half-rating" readOnly defaultValue={ratingType.rating / 2} - precision={0.01} + precision={0.5} />