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,12 +2,12 @@ import { useState } from 'react'
import { createFileRoute, Link, useNavigate } from '@tanstack/react-router'
import { useTranslation } from 'react-i18next'
import {
Alert,
Badge,
EmptyState,
LoadingBlock,
PageHeader,
Panel,
QueryErrorState,
SearchInput,
} from '@/ui'
import { useSearch } from '@/api/queries'
@@ -78,9 +78,7 @@ function SearchPage() {
)}
{hasQuery && result.error && (
<Alert variant="error" title={t('error.failed')}>
{String(result.error)}
</Alert>
<QueryErrorState error={result.error} onRetry={() => result.refetch()} />
)}
{hasQuery && result.data && result.data.total === 0 && (