Improve loading speed immensely
This commit is contained in:
@@ -63,7 +63,7 @@ export default function ItemCard({ item }: { item: Item }) {
|
|||||||
<Typography gutterBottom variant="h5" component="div">
|
<Typography gutterBottom variant="h5" component="div">
|
||||||
{item.name}
|
{item.name}
|
||||||
</Typography>
|
</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" }}>
|
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "flex-end" }}>
|
||||||
<Typography variant="body2" sx={{ color: 'text.secondary' }} className="item-description">
|
<Typography variant="body2" sx={{ color: 'text.secondary' }} className="item-description">
|
||||||
{(item.price100 / 100 * (1 - item.discount100 / 100)).toFixed(2)} €
|
{(item.price100 / 100 * (1 - item.discount100 / 100)).toFixed(2)} €
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export default function ProductInfo({ item }: { item: Item }) {
|
|||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box display="flex" alignItems="center" gap={1}>
|
<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">
|
<Typography variant="body2" color="text.secondary">
|
||||||
{item.rating > 0 ? `(${item.rating / 2} / 5)` : t('noRatingsYet')}
|
{item.rating > 0 ? `(${item.rating / 2} / 5)` : t('noRatingsYet')}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default function RatingCard(ratingType: RatingType) {
|
|||||||
name="half-rating"
|
name="half-rating"
|
||||||
readOnly
|
readOnly
|
||||||
defaultValue={ratingType.rating / 2}
|
defaultValue={ratingType.rating / 2}
|
||||||
precision={0.01}
|
precision={0.5}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
Reference in New Issue
Block a user