update goods
@@ -420,7 +420,7 @@ export function AdminProductsPage() {
|
||||
<OptimizedImage
|
||||
src={url}
|
||||
alt="Фото товара"
|
||||
widths={[80, 160]}
|
||||
widths={[320, 640]}
|
||||
sizes="80px"
|
||||
sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||
/>
|
||||
@@ -539,7 +539,7 @@ export function AdminProductsPage() {
|
||||
<OptimizedImage
|
||||
src={item.url}
|
||||
alt=""
|
||||
widths={[120, 240]}
|
||||
widths={[320, 640]}
|
||||
sizes="120px"
|
||||
sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||
/>
|
||||
|
||||
@@ -573,7 +573,7 @@ export function AdminPage() {
|
||||
<OptimizedImage
|
||||
src={url}
|
||||
alt="Фото товара"
|
||||
widths={[80, 160]}
|
||||
widths={[320, 640]}
|
||||
sizes="80px"
|
||||
sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||
/>
|
||||
@@ -692,7 +692,7 @@ export function AdminPage() {
|
||||
<OptimizedImage
|
||||
src={item.url}
|
||||
alt=""
|
||||
widths={[120, 240]}
|
||||
widths={[320, 640]}
|
||||
sizes="120px"
|
||||
sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||
/>
|
||||
|
||||
@@ -164,7 +164,7 @@ export function ProductPage() {
|
||||
|
||||
{!isAdmin && p.quantity > 0 ? <ToggleCartIcon productId={p.id} size="medium" /> : null}
|
||||
|
||||
{p.description ? (
|
||||
{p.description || p.shortDescription ? (
|
||||
<Typography sx={{ whiteSpace: 'pre-wrap' }}>{p.description}</Typography>
|
||||
) : (
|
||||
<Typography color="text.secondary">Описание появится позже.</Typography>
|
||||
@@ -238,7 +238,7 @@ export function ProductPage() {
|
||||
<OptimizedImage
|
||||
src={rv.imageUrl}
|
||||
alt="Фото к отзыву"
|
||||
widths={[140, 320]}
|
||||
widths={[320, 640]}
|
||||
sizes="140px"
|
||||
sx={{
|
||||
width: '100%',
|
||||
|
||||
@@ -41,7 +41,7 @@ describe('OptimizedImage', () => {
|
||||
})
|
||||
|
||||
it('respects custom widths', () => {
|
||||
render(<OptimizedImage src="/uploads/abc123.png" alt="test" widths={[200, 400]} />)
|
||||
render(<OptimizedImage src="/uploads/abc123.png" alt="test" widths={[320, 640]} />)
|
||||
const avifSource = screen
|
||||
.getByAltText('test')
|
||||
.closest('picture')
|
||||
|
||||
@@ -126,7 +126,7 @@ export function ReviewsBlock() {
|
||||
<OptimizedImage
|
||||
src={r.imageUrl}
|
||||
alt="Фото к отзыву"
|
||||
widths={[120, 320]}
|
||||
widths={[320, 640]}
|
||||
sizes="120px"
|
||||
sx={{
|
||||
width: '100%',
|
||||
|
||||
@@ -29,6 +29,10 @@ export default defineConfig({
|
||||
target: 'http://127.0.0.1:3333',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/uploads-resized': {
|
||||
target: 'http://127.0.0.1:3333',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
|
||||
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 15 MiB |
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.1 MiB |