= ({ yamlString }) => {
const { isDarkTheme } = useTheme();
- const { copyToClipboard } = useCopyToClipboard();
- const downloadYaml = () => {
- const blob = new Blob([yamlString], { type: 'text/yaml' });
- const url = window.URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = `${filename}.yaml`;
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- window.URL.revokeObjectURL(url);
- };
return (
-
-
- {SHOW_DOWNLOAD_BUTTON && (
-
- )}
-
= ({ yamlString, filename, yamlStringToCop
);
};
-
-export default YamlViewer;
diff --git a/src/spaces/mcp/pages/McpPage.tsx b/src/spaces/mcp/pages/McpPage.tsx
index fbf3248f..d6b0fa29 100644
--- a/src/spaces/mcp/pages/McpPage.tsx
+++ b/src/spaces/mcp/pages/McpPage.tsx
@@ -29,7 +29,7 @@ import ComponentList from '../../../components/ControlPlane/ComponentList.tsx';
import MCPHealthPopoverButton from '../../../components/ControlPlane/MCPHealthPopoverButton.tsx';
import { useApiResource } from '../../../lib/api/useApiResource.ts';
-import { YamlViewButtonWithLoader } from '../../../components/Yaml/YamlViewButtonWithLoader.tsx';
+import { YamlViewButton } from '../../../components/Yaml/YamlViewButton.tsx';
import { Landscapers } from '../../../components/ControlPlane/Landscapers.tsx';
import { AuthProviderMcp } from '../auth/AuthContextMcp.tsx';
import { isNotFoundError } from '../../../lib/api/error.ts';
@@ -105,7 +105,8 @@ export default function McpPage() {
workspaceName={workspaceName ?? ''}
mcpName={controlPlaneName}
/>
-