@@ -32,9 +32,6 @@ export const Server = ({
3232 )
3333 return null
3434
35- const ipv4 = externalNetworkInterface . ipv4Url ( devUrl . protocol )
36- ipv4 . port = devUrl . port
37-
3835 return (
3936 < Box flexDirection = "column" >
4037 < Text color = "blue" > Network</ Text >
@@ -46,31 +43,7 @@ export const Server = ({
4643 publicProxyUrl = { publicProxyUrl }
4744 />
4845
49- { devUrl ?. href && (
50- < Box flexDirection = "row" gap = { 2 } paddingLeft = { 1 } >
51- < Box minWidth = { 7 } >
52- < Text color = "white" > { figures . pointerSmall } dev</ Text >
53- </ Box >
54-
55- < Box flexDirection = "column" >
56- < Text dimColor wrap = "truncate-end" >
57- { figures . lineDashed0 } { devUrl . href }
58- </ Text >
59-
60- { ipv4 . href !== devUrl . href && (
61- < Text dimColor wrap = "truncate-end" >
62- { figures . lineDashed0 } { ipv4 . href }
63- </ Text >
64- ) }
65-
66- { publicDevUrl && publicDevUrl ?. href !== devUrl . href && (
67- < Text dimColor wrap = "truncate-end" >
68- { figures . lineDashed0 } { publicDevUrl . href }
69- </ Text >
70- ) }
71- </ Box >
72- </ Box >
73- ) }
46+ < Dev devUrl = { devUrl } publicDevUrl = { publicDevUrl } />
7447 </ Box >
7548 )
7649}
@@ -108,4 +81,44 @@ const Proxy = ({
10881 )
10982}
11083
84+ const Dev = ( {
85+ devUrl,
86+ publicDevUrl,
87+ } : {
88+ devUrl : Props [ `devUrl`]
89+ publicDevUrl : Props [ `publicDevUrl`]
90+ } ) => {
91+ if ( ! devUrl ?. href ) return null
92+
93+ const ipv4 = externalNetworkInterface . ipv4Url ( devUrl . protocol )
94+ ipv4 . port = devUrl . port
95+
96+ return (
97+ < Box flexDirection = "row" gap = { 2 } paddingLeft = { 1 } >
98+ < Box minWidth = { 7 } >
99+ < Text color = "white" > { figures . pointerSmall } Dev</ Text >
100+ </ Box >
101+
102+ < Box flexDirection = "column" >
103+ < Text dimColor wrap = "truncate-end" >
104+ { figures . lineDashed0 } { devUrl . href }
105+ </ Text >
106+
107+ { ipv4 . href !== devUrl . href && (
108+ < Text dimColor wrap = "truncate-end" >
109+ { figures . lineDashed0 } { ipv4 . href }
110+ </ Text >
111+ ) }
112+
113+ { publicDevUrl && publicDevUrl ?. href !== devUrl . href && (
114+ < Text dimColor wrap = "truncate-end" >
115+ { figures . lineDashed0 } { publicDevUrl . href }
116+ </ Text >
117+ ) }
118+ </ Box >
119+ </ Box >
120+ )
121+ }
122+
123+
111124export { Server as default }
0 commit comments