@@ -10,7 +10,7 @@ import {api} from './api';
1010export const topicApi = api . injectEndpoints ( {
1111 endpoints : ( build ) => ( {
1212 getTopic : build . query ( {
13- queryFn : async ( params : { path ? : string } ) => {
13+ queryFn : async ( params : { path : string ; database : string } ) => {
1414 try {
1515 const data = await window . api . getTopic ( params ) ;
1616 // On older version it can return HTML page of Developer UI with an error
@@ -29,18 +29,18 @@ export const topicApi = api.injectEndpoints({
2929} ) ;
3030
3131const createGetTopicSelector = createSelector (
32- ( path ? : string ) => path ,
33- ( path ) => topicApi . endpoints . getTopic . select ( { path } ) ,
32+ ( path : string , database : string ) => ( { path, database } ) ,
33+ ( params ) => topicApi . endpoints . getTopic . select ( params ) ,
3434) ;
3535
3636const selectTopicStats = createSelector (
3737 ( state : RootState ) => state ,
38- ( _state : RootState , path ? : string ) => createGetTopicSelector ( path ) ,
38+ ( _state : RootState , path : string , database : string ) => createGetTopicSelector ( path , database ) ,
3939 ( state , selectGetTopic ) => selectGetTopic ( state ) . data ?. topic_stats ,
4040) ;
4141const selectConsumers = createSelector (
4242 ( state : RootState ) => state ,
43- ( _state : RootState , path ? : string ) => createGetTopicSelector ( path ) ,
43+ ( _state : RootState , path : string , database : string ) => createGetTopicSelector ( path , database ) ,
4444 ( state , selectGetTopic ) => selectGetTopic ( state ) . data ?. consumers ,
4545) ;
4646
0 commit comments