@@ -13,27 +13,27 @@ import globalStyles from '../global.module.scss';
13
13
**/
14
14
15
15
const Images = ( { imagesList : initialImagesList } ) : JSX . Element => {
16
- //const imagesList = useAppSelector((state) => state.images.imagesList);
16
+ // const imagesList = useAppSelector((state) => state.images.imagesList);
17
17
const reduxImagesList = useAppSelector ( ( state ) => state . images . imagesList ) ;
18
18
const imagesList = initialImagesList ? [ initialImagesList ] : reduxImagesList ;
19
- const [ repo , setRepo ] = useState ( "" ) ;
19
+ const [ repo , setRepo ] = useState ( '' ) ;
20
20
const dispatch = useAppDispatch ( ) ;
21
21
const { runIm, removeIm, pullImage } = useHelper ( ) ;
22
22
23
23
const handleClick = ( ) => {
24
24
if ( ! repo ) {
25
25
dispatch (
26
26
createAlert (
27
- " Please enter an image name prior to attempting to pull." ,
27
+ ' Please enter an image name prior to attempting to pull.' ,
28
28
5 ,
29
- " error"
29
+ ' error'
30
30
)
31
31
) ;
32
32
return ;
33
33
} else {
34
34
let existingRepo = false ;
35
- if ( repo . includes ( ":" ) ) {
36
- const splitRepo = repo . split ( ":" ) ;
35
+ if ( repo . includes ( ':' ) ) {
36
+ const splitRepo = repo . split ( ':' ) ;
37
37
imagesList . map ( ( el ) => {
38
38
if ( el . reps === splitRepo [ 0 ] && el . tag === splitRepo [ 1 ] ) {
39
39
existingRepo = true ;
@@ -45,9 +45,9 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
45
45
if ( existingRepo === true ) {
46
46
dispatch (
47
47
createAlert (
48
- " This image already exists within your Docketeer image collection." ,
48
+ ' This image already exists within your Docketeer image collection.' ,
49
49
5 ,
50
- " error"
50
+ ' error'
51
51
)
52
52
) ;
53
53
return ;
@@ -57,14 +57,14 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
57
57
`Are you sure you want to pull ${ repo } ?` ,
58
58
( ) => {
59
59
pullImage ( repo ) ;
60
- dispatch ( createAlert ( `Pulling ${ repo } ...` , 5 , " success" ) ) ;
60
+ dispatch ( createAlert ( `Pulling ${ repo } ...` , 5 , ' success' ) ) ;
61
61
} ,
62
62
( ) => {
63
63
dispatch (
64
64
createAlert (
65
65
`The request to pull ${ repo } has been cancelled.` ,
66
66
5 ,
67
- " warning"
67
+ ' warning'
68
68
)
69
69
) ;
70
70
}
@@ -74,7 +74,7 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
74
74
}
75
75
} else {
76
76
imagesList . map ( ( el ) => {
77
- if ( el . reps === repo && el . tag === " latest" ) {
77
+ if ( el . reps === repo && el . tag === ' latest' ) {
78
78
existingRepo = true ;
79
79
return ;
80
80
}
@@ -84,9 +84,9 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
84
84
if ( existingRepo === true ) {
85
85
dispatch (
86
86
createAlert (
87
- " This image already exists within your Docketeer image collection." ,
87
+ ' This image already exists within your Docketeer image collection.' ,
88
88
5 ,
89
- " error"
89
+ ' error'
90
90
)
91
91
) ;
92
92
return ;
@@ -96,14 +96,14 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
96
96
`Are you sure you want to pull ${ repo } ?` ,
97
97
( ) => {
98
98
pullImage ( repo ) ;
99
- dispatch ( createAlert ( `Pulling ${ repo } ...` , 5 , " success" ) ) ;
99
+ dispatch ( createAlert ( `Pulling ${ repo } ...` , 5 , ' success' ) ) ;
100
100
} ,
101
101
( ) => {
102
102
dispatch (
103
103
createAlert (
104
104
`The request to pull ${ repo } has been cancelled.` ,
105
105
5 ,
106
- " warning"
106
+ ' warning'
107
107
)
108
108
) ;
109
109
}
@@ -117,7 +117,7 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
117
117
118
118
const handleError = ( e : SyntheticEvent < HTMLImageElement , Event > ) => {
119
119
e . currentTarget . src =
120
- " https://d36jcksde1wxzq.cloudfront.net/54e48877dab8df8f92cd.png" ;
120
+ ' https://d36jcksde1wxzq.cloudfront.net/54e48877dab8df8f92cd.png' ;
121
121
} ;
122
122
123
123
const runImage = ( image : ImageObj ) => {
@@ -127,14 +127,14 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
127
127
`Are you sure you want to run ${ image . reps } ?` ,
128
128
( ) => {
129
129
runIm ( image ) ;
130
- dispatch ( createAlert ( `Running ${ image . reps } ...` , 5 , " success" ) ) ;
130
+ dispatch ( createAlert ( `Running ${ image . reps } ...` , 5 , ' success' ) ) ;
131
131
} ,
132
132
( ) => {
133
133
dispatch (
134
134
createAlert (
135
135
`The request to run ${ image . reps } has been cancelled.` ,
136
136
5 ,
137
- " warning"
137
+ ' warning'
138
138
)
139
139
) ;
140
140
}
@@ -150,14 +150,14 @@ const Images = ({ imagesList: initialImagesList }): JSX.Element => {
150
150
`Are you sure you want to remove ${ image . reps } ?` ,
151
151
( ) => {
152
152
removeIm ( image . imgid ) ;
153
- dispatch ( createAlert ( `Removing ${ image . reps } ...` , 5 , " success" ) ) ;
153
+ dispatch ( createAlert ( `Removing ${ image . reps } ...` , 5 , ' success' ) ) ;
154
154
} ,
155
155
( ) => {
156
156
dispatch (
157
157
createAlert (
158
158
`The request to remove ${ image . reps } has been cancelled.` ,
159
159
5 ,
160
- " warning"
160
+ ' warning'
161
161
)
162
162
) ;
163
163
}
0 commit comments