|
@@ -1,6 +1,7 @@
|
|
|
import {useEffect, useState} from 'react';
|
|
|
|
|
|
import LoadingIndicator from 'sentry/components/loadingIndicator';
|
|
|
+import {useSourcePackageRegistries} from 'sentry/components/onboarding/gettingStartedDoc/useSourcePackageRegistries';
|
|
|
import {ProductSolution} from 'sentry/components/onboarding/productSelection';
|
|
|
import {PlatformKey} from 'sentry/data/platformCategories';
|
|
|
import type {Organization, PlatformIntegration, Project, ProjectKey} from 'sentry/types';
|
|
@@ -22,6 +23,7 @@ export type ModuleProps = {
|
|
|
organization?: Organization;
|
|
|
platformKey?: PlatformKey;
|
|
|
projectId?: Project['id'];
|
|
|
+ sourcePackageRegistries?: ReturnType<typeof useSourcePackageRegistries>;
|
|
|
};
|
|
|
|
|
|
// Loads the component containing the documentation for the specified platform
|
|
@@ -33,6 +35,8 @@ export function SdkDocumentation({
|
|
|
organization,
|
|
|
projectId,
|
|
|
}: SdkDocumentationProps) {
|
|
|
+ const sourcePackageRegistries = useSourcePackageRegistries(organization);
|
|
|
+
|
|
|
const [module, setModule] = useState<null | {
|
|
|
default: React.ComponentType<ModuleProps>;
|
|
|
}>(null);
|
|
@@ -95,6 +99,7 @@ export function SdkDocumentation({
|
|
|
}
|
|
|
|
|
|
const {default: GettingStartedDoc} = module;
|
|
|
+
|
|
|
return (
|
|
|
<GettingStartedDoc
|
|
|
dsn={projectKeys[0].dsn.public}
|
|
@@ -103,6 +108,7 @@ export function SdkDocumentation({
|
|
|
platformKey={platform?.id}
|
|
|
organization={organization}
|
|
|
projectId={projectId}
|
|
|
+ sourcePackageRegistries={sourcePackageRegistries}
|
|
|
/>
|
|
|
);
|
|
|
}
|