@@ -32,10 +32,10 @@ const RelayInfoSettings: React.FC = () => {
3232 updateSettings ( changedValues ) ;
3333 } ;
3434
35- const onUploadIcon = ( url : string ) => {
36- // use as onUploadIcon prop in Upload Component
37- setImage ( url ) ;
38- } ;
35+ // const onUploadIcon = (url: string) => {
36+ // // use as onUploadIcon prop in Upload Component
37+ // setImage(url);
38+ // };
3939
4040 // Common NIPs that relays might support
4141 const nipOptions = [
@@ -196,47 +196,47 @@ const RelayInfoSettings: React.FC = () => {
196196 >
197197 < S . InputField placeholder = "1.0.0" />
198198 </ Form . Item >
199-
200- < Form . Item
201- name = "relaysupportednips"
202- label = {
203- < span >
204- Supported NIPs
205- < Tooltip title = "Nostr Implementation Possibilities (NIPs) supported by this relay" >
206- < QuestionCircleOutlined />
207- </ Tooltip >
208- </ span >
209- }
210- >
211- < Select
212- mode = "tags"
213- placeholder = "Select or type custom NIP numbers (e.g. 1, 42, 999)"
214- style = { { width : '100%' } }
215- tokenSeparators = { [ ',' , ' ' ] }
216- filterOption = { ( input , option ) => {
217- if ( ! option ?. children ) return false ;
218- return option . children . toString ( ) . toLowerCase ( ) . includes ( input . toLowerCase ( ) ) ;
219- } }
220- onChange = { ( values : ( string | number ) [ ] ) => {
221- // Convert all values to numbers, filtering out invalid ones
222- const numberValues = values
223- . map ( ( val : string | number ) => {
224- const num = Number ( val ) ;
225- return isNaN ( num ) ? null : num ;
226- } )
227- . filter ( ( val : number | null ) : val is number => val !== null ) ;
228-
229- // Update the form field with number values
230- form . setFieldsValue ( { relaysupportednips : numberValues } ) ;
231- } }
199+ < S . StyledOption >
200+ < Form . Item
201+ name = "relaysupportednips"
202+ label = {
203+ < span >
204+ Supported NIPs
205+ < Tooltip title = "Nostr Implementation Possibilities (NIPs) supported by this relay" >
206+ < QuestionCircleOutlined />
207+ </ Tooltip >
208+ </ span >
209+ }
232210 >
233- { nipOptions . map ( ( option ) => (
234- < Option key = { option . value } value = { option . value } >
235- { option . label }
236- </ Option >
237- ) ) }
238- </ Select >
239- </ Form . Item >
211+ < Select
212+ mode = "tags"
213+ placeholder = "Select or type custom NIP numbers (e.g. 1, 42, 999)"
214+ style = { { width : '100%' } }
215+ tokenSeparators = { [ ',' , ' ' ] }
216+ filterOption = { ( input , option ) => {
217+ if ( ! option ?. children ) return false ;
218+ return option . children . toString ( ) . toLowerCase ( ) . includes ( input . toLowerCase ( ) ) ;
219+ } }
220+ onChange = { ( values : ( string | number ) [ ] ) => {
221+ // Convert all values to numbers, filtering out invalid ones
222+ const numberValues = values
223+ . map ( ( val : string | number ) => {
224+ const num = Number ( val ) ;
225+ return isNaN ( num ) ? null : num ;
226+ } )
227+ . filter ( ( val : number | null ) : val is number => val !== null ) ;
228+ // Update the form field with number values
229+ form . setFieldsValue ( { relaysupportednips : numberValues } ) ;
230+ } }
231+ >
232+ { nipOptions . map ( ( option ) => (
233+ < Option key = { option . value } value = { option . value } >
234+ { option . label }
235+ </ Option >
236+ ) ) }
237+ </ Select >
238+ </ Form . Item >
239+ </ S . StyledOption >
240240
241241 < Form . Item >
242242 < p
0 commit comments