feat: treat deprecation messages as markdown (#11562)

This commit is contained in:
Kayla Washburn-Love
2024-01-11 14:15:29 -07:00
committed by GitHub
parent 95fd0bb22b
commit eb8d85f432
2 changed files with 11 additions and 3 deletions
@@ -230,7 +230,8 @@ export const Deprecated: Story = {
template: {
...Mocks.MockTemplate,
deprecated: true,
deprecation_message: "Template deprecated due to reasons",
deprecation_message:
"Template deprecated due to reasons. [Learn more](#)",
},
},
};
+9 -2
View File
@@ -26,6 +26,7 @@ import { SidebarIconButton } from "components/FullPageLayout/Sidebar";
import HubOutlined from "@mui/icons-material/HubOutlined";
import { ResourcesSidebar } from "./ResourcesSidebar";
import { ResourceCard } from "components/Resources/ResourceCard";
import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
export type WorkspaceError =
| "getBuildsError"
@@ -363,8 +364,14 @@ export const Workspace: FC<WorkspaceProps> = ({
{template?.deprecated && (
<Alert severity="warning">
<AlertTitle>Workspace using deprecated template</AlertTitle>
<AlertDetail>{template?.deprecation_message}</AlertDetail>
<AlertTitle>
This workspace uses a deprecated template
</AlertTitle>
<AlertDetail>
<MemoizedInlineMarkdown>
{template?.deprecation_message}
</MemoizedInlineMarkdown>
</AlertDetail>
</Alert>
)}