Improve loading speed immensely

This commit is contained in:
Tim
2025-06-16 16:57:11 +02:00
parent 55ea6d14c5
commit b3ef4ba144
3 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ export default function ItemCard({ item }: { item: Item }) {
<Typography gutterBottom variant="h5" component="div">
{item.name}
</Typography>
<Rating name="half-rating" readOnly defaultValue={item.rating /2} precision={0.01} />
<Rating name="half-rating" readOnly defaultValue={item.rating /2} precision={0.5} />
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "flex-end" }}>
<Typography variant="body2" sx={{ color: 'text.secondary' }} className="item-description">
{(item.price100 / 100 * (1 - item.discount100 / 100)).toFixed(2)}

View File

@@ -107,7 +107,7 @@ export default function ProductInfo({ item }: { item: Item }) {
</Typography>
<Box display="flex" alignItems="center" gap={1}>
<Rating value={item.rating /2} precision={0.01} readOnly />
<Rating value={item.rating /2} precision={0.5} readOnly />
<Typography variant="body2" color="text.secondary">
{item.rating > 0 ? `(${item.rating / 2} / 5)` : t('noRatingsYet')}

View File

@@ -45,7 +45,7 @@ export default function RatingCard(ratingType: RatingType) {
name="half-rating"
readOnly
defaultValue={ratingType.rating / 2}
precision={0.01}
precision={0.5}
/>
<Typography