fix(ux): friendly error UI вместо raw AxiosError
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
} from 'd3-force'
|
||||
import { useDictionaries, dictionaryDependentsQuery, recordsQuery } from '@/api/queries'
|
||||
import type { DictionaryDefinition, SchemaDependent } from '@/api/client'
|
||||
import { GlobeLoader, LoadingBlock } from '@/ui'
|
||||
import { GlobeLoader, LoadingBlock, QueryErrorState } from '@/ui'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
// 3D-режим лениво грузится — three.js (~650kb) и react-force-graph-3d не
|
||||
@@ -165,7 +165,7 @@ export function DictionaryGraph() {
|
||||
}
|
||||
|
||||
if (dictsQuery.error) {
|
||||
return <div className="text-body text-pink">Ошибка загрузки: {String(dictsQuery.error)}</div>
|
||||
return <QueryErrorState error={dictsQuery.error} onRetry={() => dictsQuery.refetch()} />
|
||||
}
|
||||
|
||||
if (dicts.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user