File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
src/packages/frontend/project/page/flyouts Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { debounce } from "lodash";
88
99import {
1010 CSS ,
11- ReactDOM ,
1211 redux ,
1312 useActions ,
1413 useEffect ,
@@ -61,7 +60,7 @@ export function TerminalFlyout({
6160 const account_id = useTypedRedux ( "account" , "account_id" ) ;
6261 const terminal = useTypedRedux ( "account" , "terminal" ) ;
6362 const terminalRef = useRef < Terminal | undefined > ( undefined ) ;
64- const terminalDOMRef = useRef < any > ( null ) ;
63+ const terminalDOMRef = useRef < HTMLDivElement > ( null ) ;
6564 const isMountedRef = useIsMountedRef ( ) ;
6665 const student_project_functionality =
6766 useStudentProjectFunctionality ( project_id ) ;
@@ -89,13 +88,11 @@ export function TerminalFlyout({
8988 const id = `flyout::${ hash } ` ; // TODO what exactly is the ID? arbitrary or a path?
9089 useEffect ( ( ) => {
9190 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+ } ) ;
9996 }
10097 } , [ terminal_path ] ) ;
10198
@@ -189,7 +186,7 @@ export function TerminalFlyout({
189186
190187 function init_terminal ( ) : void {
191188 if ( ! is_visible ) return ;
192- const node : any = ReactDOM . findDOMNode ( terminalDOMRef . current ) ;
189+ const node = terminalDOMRef . current ;
193190 if ( node == null ) {
194191 // happens, e.g., when terminals are disabled.
195192 return ;
You can’t perform that action at this time.
0 commit comments