Skip to content

Commit a6e19dc

Browse files
committed
wip fixes
1 parent 49e64c1 commit a6e19dc

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/components/sdkApi.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ import bash from 'refractor/lang/bash.js';
66
import json from 'refractor/lang/json.js';
77
import {refractor} from 'refractor/lib/core.js';
88

9-
import {getCurrentPlatformOrGuide} from 'sentry-docs/docTree';
10-
import {serverContext} from 'sentry-docs/serverContext';
119
import {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

1913
interface 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

3530
refractor.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

Comments
 (0)