@@ -6,15 +6,9 @@ import bash from 'refractor/lang/bash.js';
66import json from 'refractor/lang/json.js' ;
77import { refractor } from 'refractor/lib/core.js' ;
88
9- import { getCurrentPlatformOrGuide } from 'sentry-docs/docTree' ;
10- import { serverContext } from 'sentry-docs/serverContext' ;
119import { PlatformCategory } from 'sentry-docs/types' ;
1210
13- import { CodeBlock } from './codeBlock' ;
14- import { CodeTabs } from './codeTabs' ;
15- import { PlatformCategorySection } from './platformCategorySection' ;
16- import { PlatformSection } from './platformSection' ;
17- import { SdkDefinition , SdkDefinitionTable , SdkDefinitionTableRow } from './sdkDefinition' ;
11+ import { SdkDefinition , SdkDefinitionTable } from './sdkDefinition' ;
1812
1913interface ParameterDef {
2014 name : string ;
@@ -30,6 +24,7 @@ type Props = {
3024 signature : string ;
3125 categorySupported ?: PlatformCategory [ ] ;
3226 children ?: React . ReactNode ;
27+ language ?: string ;
3328} ;
3429
3530refractor . register ( bash ) ;
@@ -44,11 +39,13 @@ export function SdkApi({
4439 children,
4540 signature,
4641 parameters = [ ] ,
42+ // TODO: How to handle this default better?
43+ language = 'typescript' ,
4744 categorySupported = [ ] ,
4845} : Props ) {
4946 return (
5047 < SdkDefinition name = { name } categorySupported = { categorySupported } >
51- < pre className = "mt-2 mb-2" > { codeToJsx ( signature , 'typescript' ) } </ pre >
48+ < pre className = "mt-2 mb-2" > { codeToJsx ( signature , language ) } </ pre >
5249
5350 { parameters . length ? (
5451 < Fragment >
0 commit comments