@@ -13,8 +13,6 @@ import { AlertBanner } from "components/AlertBanner/AlertBanner"
13
13
import { Region } from "api/typesGenerated"
14
14
import { ProxyRow } from "./WorkspaceProxyRow"
15
15
16
-
17
-
18
16
export interface WorkspaceProxyPageViewProps {
19
17
proxies ?: Region [ ]
20
18
getWorkspaceProxiesError ?: Error | unknown
@@ -36,45 +34,47 @@ export const WorkspaceProxyPageView: FC<
36
34
selectProxyError,
37
35
preferredProxy,
38
36
} ) => {
39
- return (
40
- < Stack >
41
- { Boolean ( getWorkspaceProxiesError ) && (
42
- < AlertBanner severity = "error" error = { getWorkspaceProxiesError } />
43
- ) }
44
- { Boolean ( selectProxyError ) && (
45
- < AlertBanner severity = "error" error = { selectProxyError } />
46
- ) }
47
- < TableContainer >
48
- < Table >
49
- < TableHead >
50
- < TableRow >
51
- < TableCell width = "40%" > Proxy</ TableCell >
52
- < TableCell width = "30%" > URL</ TableCell >
53
- < TableCell width = "10%" > Status</ TableCell >
54
- </ TableRow >
55
- </ TableHead >
56
- < TableBody >
57
- < ChooseOne >
58
- < Cond condition = { isLoading } >
59
- < TableLoader />
60
- </ Cond >
61
- < Cond condition = { hasLoaded && proxies ?. length === 0 } >
62
- < TableEmpty message = "No workspace proxies found" />
63
- </ Cond >
64
- < Cond >
65
- { proxies ?. map ( ( proxy ) => (
66
- < ProxyRow
67
- key = { proxy . id }
68
- proxy = { proxy }
69
- onSelectRegion = { onSelect }
70
- preferred = { preferredProxy ? proxy . id === preferredProxy . id : false }
71
- />
72
- ) ) }
73
- </ Cond >
74
- </ ChooseOne >
75
- </ TableBody >
76
- </ Table >
77
- </ TableContainer >
78
- </ Stack >
79
- )
80
- }
37
+ return (
38
+ < Stack >
39
+ { Boolean ( getWorkspaceProxiesError ) && (
40
+ < AlertBanner severity = "error" error = { getWorkspaceProxiesError } />
41
+ ) }
42
+ { Boolean ( selectProxyError ) && (
43
+ < AlertBanner severity = "error" error = { selectProxyError } />
44
+ ) }
45
+ < TableContainer >
46
+ < Table >
47
+ < TableHead >
48
+ < TableRow >
49
+ < TableCell width = "40%" > Proxy</ TableCell >
50
+ < TableCell width = "30%" > URL</ TableCell >
51
+ < TableCell width = "10%" > Status</ TableCell >
52
+ </ TableRow >
53
+ </ TableHead >
54
+ < TableBody >
55
+ < ChooseOne >
56
+ < Cond condition = { isLoading } >
57
+ < TableLoader />
58
+ </ Cond >
59
+ < Cond condition = { hasLoaded && proxies ?. length === 0 } >
60
+ < TableEmpty message = "No workspace proxies found" />
61
+ </ Cond >
62
+ < Cond >
63
+ { proxies ?. map ( ( proxy ) => (
64
+ < ProxyRow
65
+ key = { proxy . id }
66
+ proxy = { proxy }
67
+ onSelectRegion = { onSelect }
68
+ preferred = {
69
+ preferredProxy ? proxy . id === preferredProxy . id : false
70
+ }
71
+ />
72
+ ) ) }
73
+ </ Cond >
74
+ </ ChooseOne >
75
+ </ TableBody >
76
+ </ Table >
77
+ </ TableContainer >
78
+ </ Stack >
79
+ )
80
+ }
0 commit comments