File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
kaggle_environments/envs/connectx/visualizer/default/src Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1- import { Player , PreactAdapter } from " @kaggle-environments/core" ;
2- import { Renderer } from " ./renderer" ;
3- import " ./style.css" ;
1+ import { createReplayVisualizer , PreactAdapter } from ' @kaggle-environments/core' ;
2+ import { Renderer } from ' ./renderer' ;
3+ import ' ./style.css' ;
44
5- const app = document . getElementById ( " app" ) ;
5+ const app = document . getElementById ( ' app' ) ;
66if ( ! app ) {
7- throw new Error ( " Could not find app element" ) ;
7+ throw new Error ( ' Could not find app element' ) ;
88}
99
10- // TODO - fix this when we figure out a global format
10+ // TODO - fix this any when we figure out a global format
1111const adapter = new PreactAdapter ( Renderer as any ) ;
12- new Player ( app , adapter ) ;
12+ if ( app ) {
13+ // Set up an HMR boundary for development
14+ if ( import . meta?. env ?. DEV && import . meta?. hot ) {
15+ import . meta. hot . accept ( ) ;
16+ }
17+ createReplayVisualizer ( app , adapter ) ;
18+ }
You can’t perform that action at this time.
0 commit comments