refactor: remove duplicate order status labels, use ORDER_STATUS_DATA as single source
This commit is contained in:
@@ -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 ? 'Создание платежа…' : 'Оплатить'}
|
||||
|
||||
Reference in New Issue
Block a user