refactor: remove duplicate order status labels, use ORDER_STATUS_DATA as single source

This commit is contained in:
Kirill
2026-05-27 21:54:53 +05:00
parent ed424a3b0b
commit b0b2872cf8
8 changed files with 17 additions and 27 deletions
@@ -1,7 +1,7 @@
import Box from '@mui/material/Box'
import Button from '@mui/material/Button'
import Typography from '@mui/material/Typography'
import { orderStatusLabelRu } from '@/shared/lib/order-status-labels'
import { ORDER_STATUS_MAP } from '@/shared/lib/order-status-data'
type Props = {
status: string
@@ -43,7 +43,7 @@ export function OrderPaymentSection({ status, deliveryFeeLocked, paymentMethod,
<>
<Typography color="text.secondary" variant="body2" sx={{ mb: 1 }}>
Вы будете перенаправлены на защищённую платёжную страницу ЮKassa. После оплаты заказ получит статус «
{orderStatusLabelRu('PAID')}».
{ORDER_STATUS_MAP['PAID'] ?? 'PAID'}».
</Typography>
<Button variant="contained" onClick={onPay} disabled={isPayPending}>
{isPayPending ? 'Создание платежа…' : 'Оплатить'}