@@ -34,34 +34,34 @@ export function NodeCheckerPage() {
3434 // URL text input field.
3535 const {
3636 url,
37- clearUrl : _clearUrl ,
37+ setUrl ,
3838 renderUrlTextField,
3939 validateUrlInput,
4040 } = useUrlInput ( searchParams . get ( "url" ) || "" ) ;
4141
4242 // API port text input field.
4343 const {
4444 port : apiPort ,
45- clearPort : _clearApiPort ,
45+ setPort : setApiPort ,
4646 renderPortTextField : renderApiPortTextField ,
4747 validatePortInput : validateApiPortInput ,
4848 } = usePortInput ( searchParams . get ( "apiPort" ) || "443" ) ;
4949
5050 // Noise port text input field.
5151 const {
5252 port : noisePort ,
53- clearPort : _clearNoisePort ,
53+ setPort : setNoisePort ,
5454 renderPortTextField : renderNoisePortTextField ,
5555 validatePortInput : validateNoisePortInput ,
5656 } = usePortInput ( searchParams . get ( "noisePort" ) || "6180" ) ;
5757
5858 // Public key text input field.
5959 const {
6060 addr : publicKey ,
61- clearAddr : _clearPublicKey ,
61+ setAddr : setPublicKey ,
6262 renderAddressTextField : renderPublicKeyTextField ,
6363 validateAddressInput : validatePublicKeyAddressInput ,
64- } = useAddressInput ( ) ;
64+ } = useAddressInput ( searchParams . get ( "publicKey" ) || "" ) ;
6565
6666 const nhcUrl = determineNhcUrl ( state ) ;
6767
@@ -105,6 +105,7 @@ export function NodeCheckerPage() {
105105 url : url ,
106106 apiPort : apiPort ,
107107 noisePort : noisePort ,
108+ publicKey : publicKey ,
108109 baselineConfiguration : baselineConfiguration ! . name ,
109110 } ) ;
110111 try {
@@ -129,11 +130,16 @@ export function NodeCheckerPage() {
129130 updateChecking ( false ) ;
130131 } ;
131132
132- // Clear the results if the user changes the network.
133+ // Clear the results if the user changes the network or the search params.
134+ // Update the fields.
133135 useEffect ( ( ) => {
134136 updateEvaluationSummary ( undefined ) ;
135137 updateErrorMessage ( undefined ) ;
136- } , [ state . network_name ] ) ;
138+ setUrl ( searchParams . get ( "url" ) || "" ) ;
139+ setApiPort ( searchParams . get ( "apiPort" ) || "443" ) ;
140+ setNoisePort ( searchParams . get ( "noisePort" ) || "6180" ) ;
141+ setPublicKey ( searchParams . get ( "publicKey" ) || "" ) ;
142+ } , [ state . network_name , searchParams ] ) ;
137143
138144 // Conditionally build an input field for the public key if the selected
139145 // baseline configuration has an evaluator that requires it.
0 commit comments