Skip to content

Commit d68d4c9

Browse files
committed
fix: show topic preview if available
1 parent a61f8d9 commit d68d4c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/containers/Tenant/Query/Preview/Preview.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {useTopicDataAvailable} from '../../../../store/reducers/capabilities/hooks';
12
import {EPathType} from '../../../../types/api/schema';
23
import {isTableType} from '../../utils/schema';
34
import i18n from '../i18n';
@@ -14,11 +15,12 @@ export function PreviewContainer(props: PreviewContainerProps) {
1415
const {type} = props;
1516
const isTable = isTableType(type);
1617
const isTopic = type === EPathType.EPathTypePersQueueGroup;
18+
const isTopicPreviewAvailable = useTopicDataAvailable();
1719

1820
if (isTable) {
1921
return <TablePreview {...props} />;
2022
}
21-
if (isTopic) {
23+
if (isTopic && isTopicPreviewAvailable) {
2224
return <TopicPreview {...props} />;
2325
}
2426

0 commit comments

Comments
 (0)