@@ -239,6 +239,7 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
239239 const keySchemaName = watch ( 'key.schemaName' ) ;
240240 const valueSchemaName = watch ( 'value.schemaName' ) ;
241241
242+ // biome-ignore lint/complexity: This will be refactored anyway as part of MobX removal
242243 const onSubmit : SubmitHandler < Inputs > = async ( data ) => {
243244 const req = create ( PublishMessageRequestSchema ) ;
244245 req . topic = topicName ;
@@ -282,10 +283,13 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
282283 }
283284 req . key . data = encodeData ( data . key . data , data . key . encoding ) ;
284285 req . key . encoding = data . key . encoding ;
285-
286+
286287 // Determine schemaId from schemaVersion if schema is selected and encoding is Avro or Protobuf
287- if ( ( data . key . encoding === PayloadEncoding . AVRO || data . key . encoding === PayloadEncoding . PROTOBUF ) &&
288- data . key . schemaName && data . key . schemaVersion ) {
288+ if (
289+ ( data . key . encoding === PayloadEncoding . AVRO || data . key . encoding === PayloadEncoding . PROTOBUF ) &&
290+ data . key . schemaName &&
291+ data . key . schemaVersion
292+ ) {
289293 const schemaDetail = api . schemaDetails . get ( data . key . schemaName ) ;
290294 if ( schemaDetail ) {
291295 const selectedSchema = schemaDetail . schemas . find (
@@ -296,7 +300,7 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
296300 }
297301 }
298302 }
299-
303+
300304 req . key . index = data . key . protobufIndex ;
301305 }
302306
@@ -312,10 +316,13 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
312316 return ;
313317 }
314318 req . value . encoding = data . value . encoding ;
315-
319+
316320 // Determine schemaId from schemaVersion if schema is selected and encoding is Avro or Protobuf
317- if ( ( data . value . encoding === PayloadEncoding . AVRO || data . value . encoding === PayloadEncoding . PROTOBUF ) &&
318- data . value . schemaName && data . value . schemaVersion ) {
321+ if (
322+ ( data . value . encoding === PayloadEncoding . AVRO || data . value . encoding === PayloadEncoding . PROTOBUF ) &&
323+ data . value . schemaName &&
324+ data . value . schemaVersion
325+ ) {
319326 const schemaDetail = api . schemaDetails . get ( data . value . schemaName ) ;
320327 if ( schemaDetail ) {
321328 const selectedSchema = schemaDetail . schemas . find (
@@ -326,7 +333,7 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
326333 }
327334 }
328335 }
329-
336+
330337 req . value . index = data . value . protobufIndex ;
331338 }
332339
0 commit comments