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