import { usePurchaseRequests } from '@features/admin' import styles from './OrganizationPurchaseRequests.module.css' interface Props { orgId: string } function formatAmount(value: string | null, suffix: string): string { if (!value) return '—' return `${value} ${suffix}` } function formatDate(value: string | null): string { if (!value) return '—' const d = new Date(value) if (Number.isNaN(d.getTime())) return '—' return d.toLocaleString('ru-RU') } export function OrganizationPurchaseRequests({ orgId }: Props) { const { data, isLoading, isError } = usePurchaseRequests(orgId) if (isLoading) { return
| USDT | Сумма ₽ | Курс | Статус | Создана |
|---|---|---|---|---|
| {formatAmount(req.usdt_amount, 'USDT')} | {formatAmount(req.rub_amount, '₽')} | {req.exchange_rate ?? '—'} | {req.status} | {formatDate(req.created_at)} |