update goods

This commit is contained in:
Kirill
2026-05-15 14:43:26 +05:00
parent 48dc9de456
commit 551c9b027c
35 changed files with 12 additions and 8 deletions
@@ -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' }}
/>
+2 -2
View File
@@ -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' }}
/>
+2 -2
View File
@@ -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%',
+4
View File
@@ -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: {