deploy
This commit is contained in:
@@ -6,7 +6,6 @@ import CardContent from '@mui/material/CardContent'
|
||||
import CardMedia from '@mui/material/CardMedia'
|
||||
import Chip from '@mui/material/Chip'
|
||||
import Link from '@mui/material/Link'
|
||||
import Rating from '@mui/material/Rating'
|
||||
import Stack from '@mui/material/Stack'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import { Link as RouterLink } from 'react-router-dom'
|
||||
@@ -14,7 +13,6 @@ import { Swiper, SwiperSlide } from 'swiper/react'
|
||||
import 'swiper/css'
|
||||
import type { Product } from '@/entities/product/model/types'
|
||||
import { formatPriceRub } from '@/shared/lib/format-price'
|
||||
import { reviewsCountRu } from '@/shared/lib/reviews-count-ru'
|
||||
import type { Swiper as SwiperType } from 'swiper/types'
|
||||
|
||||
type Props = { product: Product; mediaHeight?: number; actions?: ReactNode }
|
||||
@@ -160,38 +158,6 @@ export function ProductCard({ product, mediaHeight = 200, actions }: Props) {
|
||||
<Typography variant="h6" color="primary">
|
||||
{formatPriceRub(product.priceCents)}
|
||||
</Typography>
|
||||
{product.reviewsSummary && product.reviewsSummary.approvedReviewCount > 0 && (
|
||||
<Stack spacing={0.5}>
|
||||
<Stack direction="row" spacing={0.75} sx={{ alignItems: 'center' }}>
|
||||
<Rating
|
||||
size="small"
|
||||
value={product.reviewsSummary.avgRating ?? 0}
|
||||
precision={0.25}
|
||||
readOnly
|
||||
sx={{ color: 'warning.main', fontSize: 18 }}
|
||||
/>
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{reviewsCountRu(product.reviewsSummary.approvedReviewCount)}
|
||||
</Typography>
|
||||
</Stack>
|
||||
{product.reviewsSummary.latestApprovedText ? (
|
||||
<Typography
|
||||
variant="caption"
|
||||
color="text.secondary"
|
||||
sx={{
|
||||
fontStyle: 'italic',
|
||||
overflow: 'hidden',
|
||||
display: '-webkit-box',
|
||||
WebkitLineClamp: 2,
|
||||
WebkitBoxOrient: 'vertical',
|
||||
}}
|
||||
title={product.reviewsSummary.latestApprovedText}
|
||||
>
|
||||
«{product.reviewsSummary.latestApprovedText}»
|
||||
</Typography>
|
||||
) : null}
|
||||
</Stack>
|
||||
)}
|
||||
{actions}
|
||||
</Stack>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user