diff --git a/site/src/components/Dialogs/Dialog.tsx b/site/src/components/Dialogs/Dialog.tsx index 7f249c74c590b..9ca0b36f9c352 100644 --- a/site/src/components/Dialogs/Dialog.tsx +++ b/site/src/components/Dialogs/Dialog.tsx @@ -65,6 +65,7 @@ export const DialogActionButtons: React.FC = ({ {onConfirm && ( = ({ useEffect(() => { // We only want to fetch logs when they are actually shown, // otherwise we can make a lot of requests that aren't necessary. - if (showStartupLogs) { + if (showStartupLogs && logsMachine.can("FETCH_STARTUP_LOGS")) { sendLogsEvent("FETCH_STARTUP_LOGS") } - }, [sendLogsEvent, showStartupLogs]) + }, [logsMachine, sendLogsEvent, showStartupLogs]) const logListRef = useRef(null) const logListDivRef = useRef(null) const startupLogs = useMemo(() => { diff --git a/site/src/components/WorkspaceActions/Buttons.tsx b/site/src/components/WorkspaceActions/Buttons.tsx index d6207952a4ac8..19fc2d96a0d06 100644 --- a/site/src/components/WorkspaceActions/Buttons.tsx +++ b/site/src/components/WorkspaceActions/Buttons.tsx @@ -21,6 +21,7 @@ export const UpdateButton: FC> = ({ return (