Skip to content

Commit e36792d

Browse files
committed
fix(shell-docs): hide IntegrationGrid on framework-scoped routes
1 parent 81dced2 commit e36792d

2 files changed

Lines changed: 32 additions & 18 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"use client";
2+
3+
import React from "react";
4+
import { useFramework } from "./framework-provider";
5+
6+
export function IntegrationGrid({ path }: { path?: string; exclude?: string[] }) {
7+
const { framework } = useFramework();
8+
9+
// On a framework-scoped route the user already chose a backend — hide.
10+
if (framework) return null;
11+
12+
return (
13+
<div
14+
style={{
15+
padding: "1rem",
16+
background: "var(--bg-elevated)",
17+
borderRadius: "0.5rem",
18+
marginBottom: "1rem",
19+
fontSize: "0.875rem",
20+
color: "var(--text-muted)",
21+
}}
22+
>
23+
See{" "}
24+
<a href="/integrations" style={{ color: "var(--accent)" }}>
25+
Integrations
26+
</a>{" "}
27+
for all available frameworks{path ? ` (${path})` : ""}.
28+
</div>
29+
);
30+
}

showcase/shell-docs/src/lib/mdx-registry.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Steps as DocsSteps, Step as DocsStep } from "@/components/docs-steps";
1616
import { Tabs as DocsTabs, Tab as DocsTab } from "@/components/docs-tabs";
1717
import { FrameworkTabs } from "@/components/framework-tabs";
1818
import { PropertyReference } from "@/components/property-reference";
19+
import { IntegrationGrid } from "@/components/integration-grid";
1920
import { getRegistry } from "@/lib/registry";
2021

2122
const Callout = DocsCallout;
@@ -199,24 +200,7 @@ export const docsComponents = {
199200
{children}
200201
</div>
201202
),
202-
IntegrationGrid: ({ path }: { path?: string }) => (
203-
<div
204-
style={{
205-
padding: "1rem",
206-
background: "var(--bg-elevated)",
207-
borderRadius: "0.5rem",
208-
marginBottom: "1rem",
209-
fontSize: "0.875rem",
210-
color: "var(--text-muted)",
211-
}}
212-
>
213-
See{" "}
214-
<a href="/integrations" style={{ color: "var(--accent)" }}>
215-
Integrations
216-
</a>{" "}
217-
for all available frameworks{path ? ` (${path})` : ""}.
218-
</div>
219-
),
203+
IntegrationGrid,
220204
FeatureGrid: ({ children }: { children?: React.ReactNode }) => (
221205
<div
222206
style={{

0 commit comments

Comments
 (0)