@@ -3,23 +3,28 @@ import BeatLoader from 'react-spinners/BeatLoader';
33import ParentModal from './ParentModal' ;
44import './Loader.css' ;
55
6- const Loader = ( { superState } ) => (
7- < ParentModal ModelOpen = { superState . loader } title = "Wait.... The function is being executed" >
8- < div className = "loader-main" >
9- < BeatLoader color = "#36d7b7" className = "loader-items" />
10- < BeatLoader color = "#36d7b7" className = "loader-items" />
11- < BeatLoader color = "#36d7b7" className = "loader-items" />
12- < BeatLoader color = "#36d7b7" className = "loader-items" />
13- < BeatLoader color = "#36d7b7" className = "loader-items" />
14- < BeatLoader color = "#36d7b7" className = "loader-items" />
15- < BeatLoader color = "#36d7b7" className = "loader-items" />
16- </ div >
17- < br />
18- < br />
19- { superState . dockerCheck && superState . graphs [ superState . curGraphIndex ] . built
20- ? < button className = "btn loader-btn" type = "button" > STOP Docker Build</ button >
21- : '' }
22- </ ParentModal >
23- ) ;
6+ const Loader = ( { superState } ) => {
7+ const stopDocker = ( ) => {
8+ superState . curGraphInstance . stop ( ) ;
9+ } ;
10+ return (
11+ < ParentModal ModelOpen = { superState . loader } title = "Wait.... The function is being executed" >
12+ < div className = "loader-main" >
13+ < BeatLoader color = "#36d7b7" className = "loader-items" />
14+ < BeatLoader color = "#36d7b7" className = "loader-items" />
15+ < BeatLoader color = "#36d7b7" className = "loader-items" />
16+ < BeatLoader color = "#36d7b7" className = "loader-items" />
17+ < BeatLoader color = "#36d7b7" className = "loader-items" />
18+ < BeatLoader color = "#36d7b7" className = "loader-items" />
19+ < BeatLoader color = "#36d7b7" className = "loader-items" />
20+ </ div >
21+ < br />
22+ < br />
23+ { superState . dockerCheck && superState . graphs [ superState . curGraphIndex ] . built
24+ ? < button className = "btn loader-btn" onClick = { stopDocker } type = "button" > STOP Docker Build</ button >
25+ : '' }
26+ </ ParentModal >
27+ ) ;
28+ } ;
2429
2530export default Loader ;
0 commit comments