Skip to content

Commit

Permalink
[dashboard] Only initialize WorkspaceLogs once (not on every update)
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes authored and roboquat committed Aug 26, 2021
1 parent 0530dfb commit 2eb9f4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/dashboard/src/components/WorkspaceLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function WorkspaceLogs(props: WorkspaceLogsProps) {
return function cleanUp() {
terminal.dispose();
}
});
}, []);

useEffect(() => {
// Fit terminal on window resize (debounced)
Expand All @@ -70,7 +70,7 @@ export default function WorkspaceLogs(props: WorkspaceLogsProps) {
clearTimeout(timeout!);
window.removeEventListener('resize', onWindowResize);
}
});
}, []);

useEffect(() => {
if (terminalRef.current && props.errorMessage) {
Expand Down

0 comments on commit 2eb9f4d

Please sign in to comment.