File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
app/en/resources/integrations/components Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,21 @@ import { ToolCard } from "./tool-card";
1414import { TYPE_CONFIG , TYPE_DESCRIPTIONS } from "./type-config" ;
1515import { useFilterStore , useToolkitFilters } from "./use-toolkit-filters" ;
1616
17+ // Map old MCP server paths to new integration paths
18+ function mapToNewIA ( oldLink : string ) : string {
19+ // Pattern: /en/mcp-servers/{category}/{tool} -> /en/resources/integrations/{category}/{tool}/reference
20+ const mcpServerPattern = / ^ \/ e n \/ m c p - s e r v e r s \/ ( [ ^ / ] + ) \/ ( [ ^ / ] + ) $ / ;
21+ const match = oldLink . match ( mcpServerPattern ) ;
22+
23+ if ( match ) {
24+ const [ , category , tool ] = match ;
25+ return `/en/resources/integrations/${ category } /${ tool } /reference` ;
26+ }
27+
28+ // Return original link if it doesn't match the pattern
29+ return oldLink ;
30+ }
31+
1732export default function Toolkits ( ) {
1833 const clearAllFilters = useFilterStore ( ( state ) => state . clearAllFilters ) ;
1934
@@ -123,7 +138,7 @@ export default function Toolkits() {
123138 isComingSoon = { toolkit . isComingSoon }
124139 isPro = { toolkit . isPro }
125140 key = { toolkit . id }
126- link = { toolkit . relativeDocsLink }
141+ link = { mapToNewIA ( toolkit . relativeDocsLink ) }
127142 name = { toolkit . label }
128143 type = { toolkit . type }
129144 />
You can’t perform that action at this time.
0 commit comments