File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
src/packages/frontend/components Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,19 @@ const LinkRetry: React.FC<Props> = ({
116
116
}
117
117
118
118
switch ( mode ) {
119
+ case "button" :
120
+ const btn = (
121
+ < Button onClick = { click } size = { size } >
122
+ { children }
123
+ { loading ? < Icon name = "cocalc-ring" spin /> : renderError ( ) }
124
+ </ Button >
125
+ ) ;
126
+ if ( tooltip ) {
127
+ return < Tooltip title = { tooltip } > { btn } </ Tooltip > ;
128
+ }
119
129
case "link" :
130
+ default :
131
+ console . warn ( `LinkRetry: invalid mode "${ mode } "` ) ;
120
132
const aLink = (
121
133
< a onClick = { click } style = { { cursor : "pointer" } } >
122
134
{ children }
@@ -134,18 +146,6 @@ const LinkRetry: React.FC<Props> = ({
134
146
{ renderError ( ) }
135
147
</ span >
136
148
) ;
137
- case "button" :
138
- const btn = (
139
- < Button onClick = { click } size = { size } >
140
- { children }
141
- { loading ? < Icon name = "cocalc-ring" spin /> : renderError ( ) }
142
- </ Button >
143
- ) ;
144
- if ( tooltip ) {
145
- return < Tooltip title = { tooltip } > { btn } </ Tooltip > ;
146
- }
147
- default :
148
- throw Error ( "invalid mode" ) ;
149
149
}
150
150
} ;
151
151
You can’t perform that action at this time.
0 commit comments