fix(ux): friendly error UI вместо raw AxiosError
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
Reference in New Issue
Block a user