@@ -8,7 +8,6 @@ import { debounce } from "lodash";
8
8
9
9
import {
10
10
CSS ,
11
- ReactDOM ,
12
11
redux ,
13
12
useActions ,
14
13
useEffect ,
@@ -61,7 +60,7 @@ export function TerminalFlyout({
61
60
const account_id = useTypedRedux ( "account" , "account_id" ) ;
62
61
const terminal = useTypedRedux ( "account" , "terminal" ) ;
63
62
const terminalRef = useRef < Terminal | undefined > ( undefined ) ;
64
- const terminalDOMRef = useRef < any > ( null ) ;
63
+ const terminalDOMRef = useRef < HTMLDivElement > ( null ) ;
65
64
const isMountedRef = useIsMountedRef ( ) ;
66
65
const student_project_functionality =
67
66
useStudentProjectFunctionality ( project_id ) ;
@@ -89,13 +88,11 @@ export function TerminalFlyout({
89
88
const id = `flyout::${ hash } ` ; // TODO what exactly is the ID? arbitrary or a path?
90
89
useEffect ( ( ) => {
91
90
if ( compute_server_id ) {
92
- redux
93
- . getProjectActions ( project_id )
94
- . setComputeServerIdForFile ( {
95
- path : terminal_path ,
96
- compute_server_id,
97
- confirm : false ,
98
- } ) ;
91
+ redux . getProjectActions ( project_id ) . setComputeServerIdForFile ( {
92
+ path : terminal_path ,
93
+ compute_server_id,
94
+ confirm : false ,
95
+ } ) ;
99
96
}
100
97
} , [ terminal_path ] ) ;
101
98
@@ -189,7 +186,7 @@ export function TerminalFlyout({
189
186
190
187
function init_terminal ( ) : void {
191
188
if ( ! is_visible ) return ;
192
- const node : any = ReactDOM . findDOMNode ( terminalDOMRef . current ) ;
189
+ const node = terminalDOMRef . current ;
193
190
if ( node == null ) {
194
191
// happens, e.g., when terminals are disabled.
195
192
return ;
0 commit comments