File tree 1 file changed +10
-3
lines changed
src/components/widgets/xlog
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,15 @@ const XLogSummary: FC<{
46
46
47
47
< AutoResizeHeight duration = { 0.3 } >
48
48
< p className = "text-base-content/85 !m-0 text-sm leading-loose" >
49
- { isLoading ? '加载中...' : error ? '请求错误' : data ?. data }
49
+ { isLoading ? (
50
+ < div className = "space-y-2" >
51
+ < span className = "block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
52
+ < span className = "block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
53
+ < span className = "block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
54
+ </ div >
55
+ ) : (
56
+ data ?. data
57
+ ) }
50
58
</ p >
51
59
{ isLoading && (
52
60
< p className = "border-slate-200 text-right text-sm dark:border-slate-800 " >
@@ -60,9 +68,8 @@ const XLogSummary: FC<{
60
68
</ AutoResizeHeight >
61
69
</ div >
62
70
)
63
- console . log ( data , cid )
64
71
65
- if ( ! cid || ! data ?. data ) {
72
+ if ( ! cid || error ) {
66
73
Inner = null
67
74
}
68
75
You can’t perform that action at this time.
0 commit comments