File tree Expand file tree Collapse file tree
exercises/follow_line/frontend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const WebGUI = () => {
2020 const [ image , setImage ] = useState < string | undefined > ( undefined ) ;
2121 const [ lapTime , setLapTime ] = useState < string | undefined > ( undefined ) ;
2222 const [ carPose , setCarPose ] = useState < number [ ] | undefined > ( undefined ) ;
23- const [ circuitImg , setCircuitImg ] = useState ( defaultCircuit ) ;
23+ const [ circuitImg , setCircuitImg ] = useState < string | undefined > ( undefined ) ;
2424 const [ manager , setManager ] = useState ( exerciseContext . manager ) ;
2525
2626 useEffect ( ( ) => {
@@ -100,15 +100,17 @@ const WebGUI = () => {
100100 { lapTime } s
101101 </ label >
102102 ) }
103- < div className = "overlay" id = "circuit-aerial" >
104- < img src = { circuitImg } alt = "" id = "circuit-img" />
105- { carPose && (
106- < div
107- id = "circuit-car-pos"
108- style = { { top : carPose [ 1 ] , left : carPose [ 0 ] } }
109- />
110- ) }
111- </ div >
103+ { circuitImg && (
104+ < div className = "overlay" id = "circuit-aerial" >
105+ < img src = { circuitImg } alt = "" id = "circuit-img" />
106+ { carPose && (
107+ < div
108+ id = "circuit-car-pos"
109+ style = { { top : carPose [ 1 ] , left : carPose [ 0 ] } }
110+ />
111+ ) }
112+ </ div >
113+ ) }
112114 </ WebGUIContainer >
113115 ) ;
114116} ;
You can’t perform that action at this time.
0 commit comments