11import { useEffect , useState , useRef , useContext , useMemo , KeyboardEventHandler ,
22 Dispatch , SetStateAction ,
3- } from "react" ;
3+ } from "react" ;
44import { type Terminal } from "xterm" ;
55import { type FitAddon } from "xterm-addon-fit" ;
66
@@ -122,19 +122,20 @@ export function ImageBuilder({ name, isActive, optionKey }: ICustomOptionProps)
122122 const { repo, repoId, repoFieldProps, repoError } =
123123 useRepositoryField ( binderRepo ) ;
124124 const { getRepositoryOptions, getRefOptions, removeRefOption, removeRepositoryOption,
125- setBuildImageStart } = useFormCache ( ) ;
125+ setBuildImageStart } = useFormCache ( ) ;
126126
127127 const [ ref , setRef ] = useState < string > ( repoRef || "HEAD" ) ;
128128 const repoFieldRef = useRef < HTMLInputElement > ( ) ;
129129 const branchFieldRef = useRef < HTMLInputElement > ( ) ;
130130
131131 const [ customImage , setCustomImage ] = useState < string > ( "" ) ;
132- const [ customImageError , setCustomImageError ] = useState < string > ( null ) ;
132+ const [ customImageError ] = useState < string > ( null ) ;
133133
134134 const [ term , setTerm ] = useState < Terminal > ( null ) ;
135135 const [ fitAddon , setFitAddon ] = useState < FitAddon > ( null ) ;
136136
137- const [ isBuildingImage , setIsBuildingImage ] = useState < boolean > ( false ) ;
137+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
138+ const [ _isBuildingImage , setIsBuildingImage ] = useState < boolean > ( false ) ;
138139
139140 const hrefReop = useRef < string > ( repo ) ;
140141 const hrefRef = useRef < string > ( ref ) ;
@@ -170,7 +171,6 @@ export function ImageBuilder({ name, isActive, optionKey }: ICustomOptionProps)
170171 }
171172
172173 const handleBuildStart = async ( ) => {
173-
174174 if ( repoFieldRef . current && ! hrefReop . current ) {
175175 repoFieldRef . current . focus ( ) ;
176176 repoFieldRef . current . blur ( ) ;
@@ -186,7 +186,7 @@ export function ImageBuilder({ name, isActive, optionKey }: ICustomOptionProps)
186186 try {
187187 hrefSetIsBuildingImage . current ( true ) ;
188188 const imageName = await buildImage ( hrefRepoId . current , hrefRef . current ,
189- hrefTerm . current , hrefFitAddon . current ) ;
189+ hrefTerm . current , hrefFitAddon . current ) ;
190190 //console.log("handleBuildStart: step 4", imageName);
191191 hrefSetCustomImage . current ( imageName ) ;
192192 hrefTerm . current . write ( "\nImage has been built! Starting your server..." ) ;
@@ -200,11 +200,11 @@ export function ImageBuilder({ name, isActive, optionKey }: ICustomOptionProps)
200200 } ;
201201
202202 useEffect ( ( ) => {
203- setBuildImageStart ( ( ) => handleBuildStart ) ;
204- return ( ) => {
205- setBuildImageStart ( null ) ;
206- } ;
207- } , [ ] ) ;
203+ setBuildImageStart ( ( ) => handleBuildStart ) ;
204+ return ( ) => {
205+ setBuildImageStart ( null ) ;
206+ } ;
207+ } , [ ] ) ;
208208
209209 const handleKeyDown : KeyboardEventHandler < HTMLInputElement > = ( e ) => {
210210 if ( e . key === "Enter" ) {
0 commit comments