Skip to content

Commit 07e5a9e

Browse files
fix: add react to product analytics onboarding (PostHog#29247)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent aa06883 commit 07e5a9e

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed
-475 KB
Loading
-475 KB
Loading

frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
ProductAnalyticsNuxtJSInstructions,
2323
ProductAnalyticsPHPInstructions,
2424
ProductAnalyticsPythonInstructions,
25+
ProductAnalyticsReactInstructions,
2526
ProductAnalyticsRemixJSInstructions,
2627
ProductAnalyticsRNInstructions,
2728
ProductAnalyticsRubyInstructions,
@@ -35,6 +36,7 @@ export const ProductAnalyticsSDKInstructions: SDKInstructionsMap = {
3536
[SDKKey.JS_WEB]: JSWebInstructions,
3637
[SDKKey.ANDROID]: ProductAnalyticsAndroidInstructions,
3738
[SDKKey.ANGULAR]: ProductAnalyticsAngularInstructions,
39+
[SDKKey.REACT]: ProductAnalyticsReactInstructions,
3840
[SDKKey.API]: ProductAnalyticsAPIInstructions,
3941
[SDKKey.ASTRO]: ProductAnalyticsAstroInstructions,
4042
[SDKKey.BUBBLE]: ProductAnalyticsBubbleInstructions,

frontend/src/scenes/onboarding/sdks/product-analytics/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export * from './nodejs'
1919
export * from './nuxt'
2020
export * from './php'
2121
export * from './python'
22+
export * from './react'
2223
export * from './react-native'
2324
export * from './remix'
2425
export * from './ruby'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { LemonDivider } from '@posthog/lemon-ui'
2+
3+
import { SDKInstallReactInstructions } from '../sdk-install-instructions/react'
4+
import { ProductAnalyticsAllJSFinalSteps } from './AllJSFinalSteps'
5+
6+
export function ProductAnalyticsReactInstructions(): JSX.Element {
7+
return (
8+
<>
9+
<SDKInstallReactInstructions />
10+
<LemonDivider thick dashed className="my-4" />
11+
<ProductAnalyticsAllJSFinalSteps />
12+
</>
13+
)
14+
}

frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ export function SDKInstallReactInstructions(): JSX.Element {
5555
<h3>Add environment variables</h3>
5656
<ReactEnvVarsSnippet />
5757
<h3>Initialize</h3>
58-
<p>
59-
Integrate PostHog at the root of your app (<code>src/index.js</code> for the default{' '}
60-
<code>create-react-app</code>).
61-
</p>
58+
<p>Integrate PostHog at the root of your app.</p>
6259
<ReactSetupSnippet />
6360
</>
6461
)

0 commit comments

Comments
 (0)