Skip to content

Commit a7516bc

Browse files
obostjancicandrewshie-sentry
authored andcommitted
ref(getting-started): remove platformOrIntegration (#89591)
1 parent 8a1acea commit a7516bc

File tree

5 files changed

+42
-217
lines changed

5 files changed

+42
-217
lines changed

static/app/routes.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,9 +1090,7 @@ function buildRoutes() {
10901090
/>
10911091
<Route
10921092
path=":projectId/getting-started/"
1093-
component={make(
1094-
() => import('sentry/views/projectInstall/platformOrIntegration')
1095-
)}
1093+
component={make(() => import('sentry/views/projectInstall/gettingStarted'))}
10961094
/>
10971095
</Fragment>
10981096
);

static/app/views/projectInstall/platformOrIntegration.spec.tsx renamed to static/app/views/projectInstall/gettingStarted.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {render, screen} from 'sentry-test/reactTestingLibrary';
77
import ProjectsStore from 'sentry/stores/projectsStore';
88
import type {Project} from 'sentry/types/project';
99

10-
import PlatformOrIntegration from './platformOrIntegration';
10+
import PlatformOrIntegration from './gettingStarted';
1111

1212
type ProjectWithBadPlatform = Omit<Project, 'platform'> & {
1313
platform: string;

static/app/views/projectInstall/gettingStarted.tsx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
11
import styled from '@emotion/styled';
22

33
import * as Layout from 'sentry/components/layouts/thirds';
4+
import {OnboardingContextProvider} from 'sentry/components/onboarding/onboardingContext';
5+
import allPlatforms from 'sentry/data/platforms';
46
import {space} from 'sentry/styles/space';
7+
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
8+
import useOrganization from 'sentry/utils/useOrganization';
9+
import useProjects from 'sentry/utils/useProjects';
510

6-
const GettingStarted = styled(Layout.Page)`
11+
import {ProjectInstallPlatform} from './platform';
12+
13+
type Props = RouteComponentProps<{projectId: string}>;
14+
15+
function GettingStarted({params}: Props) {
16+
const organization = useOrganization();
17+
18+
const {projects, initiallyLoaded} = useProjects({
19+
slugs: [params.projectId],
20+
orgId: organization.slug,
21+
});
22+
23+
const loadingProjects = !initiallyLoaded;
24+
const project = loadingProjects
25+
? undefined
26+
: projects.find(proj => proj.slug === params.projectId);
27+
28+
const currentPlatformKey = project?.platform ?? 'other';
29+
const currentPlatform = allPlatforms.find(p => p.id === currentPlatformKey);
30+
31+
return (
32+
<OnboardingContextProvider>
33+
<GettingStartedLayout withPadding>
34+
<ProjectInstallPlatform
35+
project={project}
36+
loading={loadingProjects}
37+
platform={currentPlatform}
38+
currentPlatformKey={currentPlatformKey}
39+
/>
40+
</GettingStartedLayout>
41+
</OnboardingContextProvider>
42+
);
43+
}
44+
45+
const GettingStartedLayout = styled(Layout.Page)`
746
background: ${p => p.theme.background};
847
padding-top: ${space(3)};
948
`;

static/app/views/projectInstall/platformIntegrationSetup.tsx

Lines changed: 0 additions & 170 deletions
This file was deleted.

static/app/views/projectInstall/platformOrIntegration.tsx

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)