Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Lior539 committed Mar 19, 2024
1 parent f0eb077 commit 3b0e3a5
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/src/scenes/onboarding/sdks/allSDKs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const allSDKs: SDK[] = [
key: SDKKey.ANGULAR,
tags: [SDKTag.WEB],
image: require('./logos/angular.svg'),
docsLink: 'https://posthog.com/docs/libraries/react-native',
docsLink: 'https://posthog.com/docs/libraries/angular',
},
{
name: 'React',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './android'
export * from './angular'
export * from './api'
export * from './flutter'
export * from './go'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './android'
export * from './angular'
export * from './api'
export * from './elixir'
export * from './flutter'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useValues } from 'kea'
import { CodeSnippet, Language } from 'lib/components/CodeSnippet'
import { Link } from 'lib/lemon-ui/Link'
import { apiHostOrigin } from 'lib/utils/apiHost'
import { teamLogic } from 'scenes/teamLogic'

Expand All @@ -11,17 +10,16 @@ function EnvVarsSnippet(): JSX.Element {

return (
<CodeSnippet language={Language.Bash}>
{[`POSTHOG_KEY=${currentTeam?.api_token}`, `POSTHOG_HOST=${apiHostOrigin()}`].join(
'\n'
)}
{[`POSTHOG_KEY=${currentTeam?.api_token}`, `POSTHOG_HOST=${apiHostOrigin()}`].join('\n')}
</CodeSnippet>
)
}

function AngularInitializeCodeSnippet(): JSX.Element {
return (
<CodeSnippet language={Language.JavaScript}>
{`
{`// in src/main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';
Expand All @@ -40,7 +38,6 @@ bootstrapApplication(AppComponent, appConfig)
)
}


export function SDKInstallAngularInstructions(): JSX.Element {
return (
<>
Expand All @@ -51,10 +48,6 @@ export function SDKInstallAngularInstructions(): JSX.Element {
Add your environment variables to your .env.local file and to your hosting provider (e.g. Vercel,
Netlify, AWS). You can find your project API key in your project settings.
</p>
<p className="italic">
These values need to start with <code className="not-italic">NEXT_PUBLIC_</code> to be accessible on the
client-side.
</p>
<EnvVarsSnippet />

<h3>Initialize</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './android'
export * from './angular'
export * from './elixir'
export * from './flutter'
export * from './go'
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/scenes/onboarding/sdks/session-replay/angular.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { SDKInstallAngularInstructions } from '../sdk-install-instructions'
import { SessionReplayFinalSteps } from '../shared-snippets'

export function AngularInstructions(): JSX.Element {
return (
<>
<SDKInstallAngularInstructions />
<SessionReplayFinalSteps />
</>
)
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './angular'
export * from './html-snippet'
export * from './js-web'
export * from './next-js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { SDKInstructionsMap, SDKKey } from '~/types'

import { HTMLSnippetInstructions, JSWebInstructions, NextJSInstructions, ReactInstructions, AngularInstructions } from '.'
import {
AngularInstructions,
HTMLSnippetInstructions,
JSWebInstructions,
NextJSInstructions,
ReactInstructions,
} from '.'

export const SurveysSDKInstructions: SDKInstructionsMap = {
[SDKKey.JS_WEB]: JSWebInstructions,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/onboarding/sdks/surveys/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './angular'
export * from './html-snippet'
export * from './js-web'
export * from './next-js'
Expand Down

0 comments on commit 3b0e3a5

Please sign in to comment.