diff --git a/site/src/pages/WorkspacePage/WorkspaceActions/Buttons.tsx b/site/src/pages/WorkspacePage/WorkspaceActions/Buttons.tsx index caa034d77c29f..ecfde9e97aa9b 100644 --- a/site/src/pages/WorkspacePage/WorkspaceActions/Buttons.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceActions/Buttons.tsx @@ -63,7 +63,21 @@ export const StartButton: FC = ({ disabled, tooltipText, }) => { - const buttonContent = ( + let mainButton = ( + } + onClick={() => handleAction()} + disabled={disabled || loading} + > + {loading ? <>Starting… : "Start"} + + ); + + if (tooltipText) { + mainButton = {mainButton}; + } + + return ( = ({ }} disabled={disabled} > - } - onClick={() => handleAction()} - disabled={disabled || loading} - > - {loading ? <>Starting… : "Start"} - + {mainButton} = ({ /> ); - - return tooltipText ? ( - {buttonContent} - ) : ( - buttonContent - ); }; export const StopButton: FC = ({