@@ -13,7 +13,7 @@ import { AlertBanner } from "components/AlertBanner/AlertBanner"
13
13
import { Region } from "api/typesGenerated"
14
14
import { ProxyRow } from "./WorkspaceProxyRow"
15
15
16
- export interface WorkspaceProxyPageViewProps {
16
+ export interface WorkspaceProxyViewProps {
17
17
proxies ?: Region [ ]
18
18
getWorkspaceProxiesError ?: Error | unknown
19
19
isLoading : boolean
@@ -23,8 +23,8 @@ export interface WorkspaceProxyPageViewProps {
23
23
selectProxyError ?: Error | unknown
24
24
}
25
25
26
- export const WorkspaceProxyPageView : FC <
27
- React . PropsWithChildren < WorkspaceProxyPageViewProps >
26
+ export const WorkspaceProxyView : FC <
27
+ React . PropsWithChildren < WorkspaceProxyViewProps >
28
28
> = ( {
29
29
proxies,
30
30
getWorkspaceProxiesError,
@@ -34,47 +34,47 @@ export const WorkspaceProxyPageView: FC<
34
34
selectProxyError,
35
35
preferredProxy,
36
36
} ) => {
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
- }
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