File tree 1 file changed +16
-14
lines changed
site/src/pages/WorkspacePage/WorkspaceActions 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,21 @@ export const StartButton: FC<ActionButtonPropsWithWorkspace> = ({
63
63
disabled,
64
64
tooltipText,
65
65
} ) => {
66
- const buttonContent = (
66
+ let mainButton = (
67
+ < TopbarButton
68
+ startIcon = { < PlayCircleOutlineIcon /> }
69
+ onClick = { ( ) => handleAction ( ) }
70
+ disabled = { disabled || loading }
71
+ >
72
+ { loading ? < > Starting…</ > : "Start" }
73
+ </ TopbarButton >
74
+ ) ;
75
+
76
+ if ( tooltipText ) {
77
+ mainButton = < Tooltip title = { tooltipText } > { mainButton } </ Tooltip > ;
78
+ }
79
+
80
+ return (
67
81
< ButtonGroup
68
82
variant = "outlined"
69
83
sx = { {
@@ -74,13 +88,7 @@ export const StartButton: FC<ActionButtonPropsWithWorkspace> = ({
74
88
} }
75
89
disabled = { disabled }
76
90
>
77
- < TopbarButton
78
- startIcon = { < PlayCircleOutlineIcon /> }
79
- onClick = { ( ) => handleAction ( ) }
80
- disabled = { disabled || loading }
81
- >
82
- { loading ? < > Starting…</ > : "Start" }
83
- </ TopbarButton >
91
+ { mainButton }
84
92
< BuildParametersPopover
85
93
label = "Start with build parameters"
86
94
workspace = { workspace }
@@ -89,12 +97,6 @@ export const StartButton: FC<ActionButtonPropsWithWorkspace> = ({
89
97
/>
90
98
</ ButtonGroup >
91
99
) ;
92
-
93
- return tooltipText ? (
94
- < Tooltip title = { tooltipText } > { buttonContent } </ Tooltip >
95
- ) : (
96
- buttonContent
97
- ) ;
98
100
} ;
99
101
100
102
export const StopButton : FC < ActionButtonProps > = ( {
You can’t perform that action at this time.
0 commit comments