fix(ux): friendly error UI вместо raw AxiosError

This commit is contained in:
Александр Зимин
2026-05-12 12:41:48 +00:00
parent db0986d235
commit 3984d99004
14 changed files with 274 additions and 57 deletions
+2 -4
View File
@@ -2,7 +2,6 @@ import { useEffect, useMemo, useState } from 'react'
import { createFileRoute, useNavigate } from '@tanstack/react-router'
import { useTranslation } from 'react-i18next'
import {
Alert,
Badge,
Button,
DatePicker,
@@ -10,6 +9,7 @@ import {
IconButton,
LoadingBlock,
PageHeader,
QueryErrorState,
SingleSelect,
Table,
TableBody,
@@ -266,9 +266,7 @@ function AuditPage() {
)}
{error ? (
<Alert variant="error" title={t('error.failed')}>
{String(error)}
</Alert>
<QueryErrorState error={error} onRetry={() => refetch()} />
) : isLoading ? (
<LoadingBlock size="md" label={t('loading')} />
) : !data || data.content.length === 0 ? (