@@ -11,6 +11,7 @@ interface MessageGridProps {
1111 messages : CollectionEntry < CollectionMessageTypes > [ ] ;
1212 containers ?: CollectionEntry < 'containers' > [ ] ;
1313 embeded : boolean ;
14+ isVisualiserEnabled : boolean ;
1415}
1516
1617interface GroupedMessages {
@@ -19,7 +20,7 @@ interface GroupedMessages {
1920 receives ?: CollectionEntry < CollectionMessageTypes > [ ] ;
2021}
2122
22- export default function MessageGrid ( { messages, embeded, containers } : MessageGridProps ) {
23+ export default function MessageGrid ( { messages, embeded, containers, isVisualiserEnabled } : MessageGridProps ) {
2324 const [ searchQuery , setSearchQuery ] = useState ( '' ) ;
2425 const [ urlParams , setUrlParams ] = useState < {
2526 serviceId ?: string ;
@@ -344,12 +345,14 @@ export default function MessageGrid({ messages, embeded, containers }: MessageGr
344345 </ a >
345346 </ div >
346347 < div className = "flex gap-2" >
347- < a
348- href = { buildUrl ( `/visualiser/domains/${ urlParams . domainId } ` ) }
349- className = "inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200"
350- >
351- View in visualizer
352- </ a >
348+ { isVisualiserEnabled && (
349+ < a
350+ href = { buildUrl ( `/visualiser/domains/${ urlParams . domainId } ` ) }
351+ className = "inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200"
352+ >
353+ View in visualizer
354+ </ a >
355+ ) }
353356 < a
354357 href = { buildUrl ( `/docs/domains/${ urlParams . domainId } ` ) }
355358 className = "inline-flex items-center px-3 py-2 text-sm font-medium text-black border border-gray-300 bg-white rounded-md transition-colors duration-200"
@@ -372,12 +375,14 @@ export default function MessageGrid({ messages, embeded, containers }: MessageGr
372375 < ServerIcon className = "h-6 w-6 text-pink-500" />
373376 < h2 className = "text-2xl font-semibold text-gray-900" > { urlParams . serviceName } </ h2 >
374377 < div className = "flex gap-2 ml-auto" >
375- < a
376- href = { buildUrl ( `/visualiser/services/${ urlParams . serviceId } ` ) }
377- className = "inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200 hover:bg-gray-50"
378- >
379- View in visualizer
380- </ a >
378+ { isVisualiserEnabled && (
379+ < a
380+ href = { buildUrl ( `/visualiser/services/${ urlParams . serviceId } ` ) }
381+ className = "inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200 hover:bg-gray-50"
382+ >
383+ View in visualizer
384+ </ a >
385+ ) }
381386 < a
382387 href = { buildUrl ( `/docs/services/${ urlParams . serviceId } ` ) }
383388 className = "inline-flex items-center px-3 py-2 text-sm font-medium text-black border border-gray-300 bg-white rounded-md transition-colors duration-200 hover:bg-gray-50"
0 commit comments