MCPcopy
hub / github.com/PostHog/posthog / UpgradeModal

Function UpgradeModal

frontend/src/scenes/UpgradeModal.tsx:8–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { urls } from './urls'
7
8export function UpgradeModal(): JSX.Element {
9 const { upgradeModalFeatureNameAndCaption } = useValues(sceneLogic)
10 const { hideUpgradeModal } = useActions(sceneLogic)
11
12 const [featureName, featureCaption] = upgradeModalFeatureNameAndCaption ?? []
13
14 return (
15 <LemonModal
16 title="Unleash PostHog's full power"
17 footer={
18 <>
19 <LemonButton type="secondary" onClick={hideUpgradeModal}>
20 Maybe later
21 </LemonButton>
22 <LemonButton
23 type="primary"
24 to={urls.organizationBilling()}
25 onClick={() => {
26 hideUpgradeModal()
27 posthog.capture('upgrade modal pricing interaction')
28 }}
29 >
30 Upgrade now
31 </LemonButton>
32 </>
33 }
34 onClose={hideUpgradeModal}
35 isOpen={!!featureName}
36 >
37 <p>
38 <b>{featureName && capitalizeFirstLetter(featureName)}</b> is an advanced PostHog feature.
39 </p>
40 {featureCaption && <p>{featureCaption}</p>}
41 <p className="mb-0">Upgrade and get access to this, as well as to other powerful enhancements.</p>
42 </LemonModal>
43 )
44}

Callers

nothing calls this directly

Calls 2

capitalizeFirstLetterFunction · 0.90
captureMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…