File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ export const Suspensable: FCC<SuspensableProps> = ({
28
28
29
29
return (
30
30
< ErrorBoundary
31
- fallback = { ( { resetError : _resetError } ) => {
31
+ fallback = { ( { resetError : _resetError , error } ) => {
32
32
resetError . current = _resetError
33
33
34
34
return (
35
35
< NonIdealState
36
36
icon = "issue"
37
37
title = "加载失败"
38
- description = { fetcher && '数据加载失败,请尝试' }
38
+ description = { fetcher ? '数据加载失败,请尝试' : error . message }
39
+ className = "py-8"
39
40
action = {
40
41
fetcher && (
41
42
< Button
Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ import { toCopilotOperation } from '../../models/converter'
43
43
import { CopilotDocV1 } from '../../models/copilot.schema'
44
44
import { createCustomLevel , findLevelByStageName } from '../../models/level'
45
45
import { Level } from '../../models/operation'
46
- import { toShortCode } from '../../models/shortCode'
47
46
import { formatError } from '../../utils/error'
48
- import { snakeCaseKeysUnicode } from '../../utils/object'
49
47
import { ActionCard } from '../ActionCard'
50
48
import { CommentArea } from './comment/CommentArea'
51
49
Original file line number Diff line number Diff line change @@ -4,6 +4,5 @@ import { OperationViewer } from 'components/viewer/OperationViewer'
4
4
5
5
export const ViewPage = ( ) => {
6
6
const { id } = useParams ( )
7
- if ( ! id ) throw 'empty'
8
- return < OperationViewer operationId = { id } onCloseDrawer = { ( ) => { } } />
7
+ return < OperationViewer operationId = { id ! } onCloseDrawer = { ( ) => { } } />
9
8
}
You can’t perform that action at this time.
0 commit comments