Skip to content

Commit b69dea6

Browse files
committed
lint
1 parent 2277834 commit b69dea6

File tree

8 files changed

+81
-22
lines changed

8 files changed

+81
-22
lines changed

apps/sim/app/(landing)/components/demo-request/demo-request-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import {
1313
Textarea,
1414
} from '@/components/emcn'
1515
import { Check } from '@/components/emcn/icons'
16+
import { captureClientEvent } from '@/lib/posthog/client'
1617
import {
1718
DEMO_REQUEST_COMPANY_SIZE_OPTIONS,
1819
type DemoRequestPayload,
1920
demoRequestSchema,
2021
} from '@/app/(landing)/components/demo-request/consts'
21-
import { captureClientEvent } from '@/lib/posthog/client'
2222

2323
interface DemoRequestModalProps {
2424
children: React.ReactNode

apps/sim/app/(landing)/components/footer/footer-cta.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import { useCallback, useRef, useState } from 'react'
44
import { ArrowUp } from 'lucide-react'
55
import Link from 'next/link'
6+
import { captureClientEvent } from '@/lib/posthog/client'
67
import { useLandingSubmit } from '@/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel'
7-
import { useAnimatedPlaceholder } from '@/hooks/use-animated-placeholder'
88
import { trackLandingCta } from '@/app/(landing)/landing-analytics'
9-
import { captureClientEvent } from '@/lib/posthog/client'
9+
import { useAnimatedPlaceholder } from '@/hooks/use-animated-placeholder'
1010

1111
const MAX_HEIGHT = 120
1212

@@ -97,14 +97,22 @@ export function FooterCTA() {
9797
target='_blank'
9898
rel='noopener noreferrer'
9999
className={`${CTA_BUTTON} border-[var(--landing-border-strong)] text-[var(--landing-text)] transition-colors hover:bg-[var(--landing-bg-elevated)]`}
100-
onClick={() => trackLandingCta({ label: 'Docs', section: 'footer_cta', destination: 'https://docs.sim.ai' })}
100+
onClick={() =>
101+
trackLandingCta({
102+
label: 'Docs',
103+
section: 'footer_cta',
104+
destination: 'https://docs.sim.ai',
105+
})
106+
}
101107
>
102108
Docs
103109
</a>
104110
<Link
105111
href='/signup'
106112
className={`${CTA_BUTTON} gap-2 border-white bg-white text-black transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]`}
107-
onClick={() => trackLandingCta({ label: 'Get started', section: 'footer_cta', destination: '/signup' })}
113+
onClick={() =>
114+
trackLandingCta({ label: 'Get started', section: 'footer_cta', destination: '/signup' })
115+
}
108116
>
109117
Get started
110118
</Link>

apps/sim/app/(landing)/components/hero/hero.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ export default function Hero() {
5858
type='button'
5959
className={`${CTA_BASE} border-[var(--landing-border-strong)] bg-transparent text-[var(--landing-text)] transition-colors hover:bg-[var(--landing-bg-elevated)]`}
6060
aria-label='Get a demo'
61-
onClick={() => trackLandingCta({ label: 'Get a demo', section: 'hero', destination: 'demo_modal' })}
61+
onClick={() =>
62+
trackLandingCta({ label: 'Get a demo', section: 'hero', destination: 'demo_modal' })
63+
}
6264
>
6365
Get a demo
6466
</button>
@@ -67,7 +69,9 @@ export default function Hero() {
6769
href='/signup'
6870
className={`${CTA_BASE} gap-2 border-white bg-white text-black transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]`}
6971
aria-label='Get started with Sim'
70-
onClick={() => trackLandingCta({ label: 'Get started', section: 'hero', destination: '/signup' })}
72+
onClick={() =>
73+
trackLandingCta({ label: 'Get started', section: 'hero', destination: '/signup' })
74+
}
7175
>
7276
Get started
7377
</Link>

apps/sim/app/(landing)/components/landing-preview/components/landing-preview-home/landing-preview-home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { AnimatePresence, motion } from 'framer-motion'
55
import { ArrowUp, Table } from 'lucide-react'
66
import { Blimp, Checkbox, ChevronDown } from '@/components/emcn'
77
import { TypeBoolean, TypeNumber, TypeText } from '@/components/emcn/icons'
8+
import { captureClientEvent } from '@/lib/posthog/client'
89
import { useLandingSubmit } from '@/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel'
910
import { EASE_OUT } from '@/app/(landing)/components/landing-preview/components/landing-preview-workflow/workflow-data'
1011
import { useAnimatedPlaceholder } from '@/hooks/use-animated-placeholder'
11-
import { captureClientEvent } from '@/lib/posthog/client'
1212

1313
const C = {
1414
SURFACE: '#292929',

apps/sim/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { useRouter } from 'next/navigation'
88
import { createPortal } from 'react-dom'
99
import { Blimp, BubbleChatPreview, ChevronDown, MoreHorizontal, Play } from '@/components/emcn'
1010
import { AgentIcon, HubspotIcon, OpenAIIcon, SalesforceIcon } from '@/components/icons'
11-
import { captureClientEvent } from '@/lib/posthog/client'
1211
import { LandingPromptStorage } from '@/lib/core/utils/browser-storage'
12+
import { captureClientEvent } from '@/lib/posthog/client'
1313
import {
1414
EASE_OUT,
1515
type EditorPromptData,

apps/sim/app/(landing)/components/navbar/navbar.tsx

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import { useSearchParams } from 'next/navigation'
77
import { GithubOutlineIcon } from '@/components/icons'
88
import { useSession } from '@/lib/auth/auth-client'
99
import { cn } from '@/lib/core/utils/cn'
10-
import { trackLandingCta } from '@/app/(landing)/landing-analytics'
1110
import {
1211
BlogDropdown,
1312
type NavBlogPost,
1413
} from '@/app/(landing)/components/navbar/components/blog-dropdown'
1514
import { DocsDropdown } from '@/app/(landing)/components/navbar/components/docs-dropdown'
1615
import { GitHubStars } from '@/app/(landing)/components/navbar/components/github-stars'
16+
import { trackLandingCta } from '@/app/(landing)/landing-analytics'
1717
import { getBrandConfig } from '@/ee/whitelabeling'
1818

1919
type DropdownId = 'docs' | 'blog' | null
@@ -213,7 +213,13 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
213213
href='/workspace'
214214
className='inline-flex h-[30px] items-center gap-[7px] rounded-[5px] border border-[var(--white)] bg-[var(--white)] px-[9px] text-[13.5px] text-black transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
215215
aria-label='Go to app'
216-
onClick={() => trackLandingCta({ label: 'Go to App', section: 'navbar', destination: '/workspace' })}
216+
onClick={() =>
217+
trackLandingCta({
218+
label: 'Go to App',
219+
section: 'navbar',
220+
destination: '/workspace',
221+
})
222+
}
217223
>
218224
Go to App
219225
</Link>
@@ -223,15 +229,23 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
223229
href='/login'
224230
className='inline-flex h-[30px] items-center rounded-[5px] border border-[var(--landing-border-strong)] px-[9px] text-[13.5px] text-[var(--landing-text)] transition-colors hover:bg-[var(--landing-bg-elevated)]'
225231
aria-label='Log in'
226-
onClick={() => trackLandingCta({ label: 'Log in', section: 'navbar', destination: '/login' })}
232+
onClick={() =>
233+
trackLandingCta({ label: 'Log in', section: 'navbar', destination: '/login' })
234+
}
227235
>
228236
Log in
229237
</Link>
230238
<Link
231239
href='/signup'
232240
className='inline-flex h-[30px] items-center gap-[7px] rounded-[5px] border border-[var(--white)] bg-[var(--white)] px-2.5 text-[13.5px] text-black transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
233241
aria-label='Get started with Sim'
234-
onClick={() => trackLandingCta({ label: 'Get started', section: 'navbar', destination: '/signup' })}
242+
onClick={() =>
243+
trackLandingCta({
244+
label: 'Get started',
245+
section: 'navbar',
246+
destination: '/signup',
247+
})
248+
}
235249
>
236250
Get started
237251
</Link>
@@ -307,7 +321,14 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
307321
<Link
308322
href='/workspace'
309323
className='flex h-[32px] items-center justify-center rounded-[5px] border border-[var(--white)] bg-[var(--white)] text-[14px] text-black transition-colors active:bg-[#E0E0E0]'
310-
onClick={() => { trackLandingCta({ label: 'Go to App', section: 'navbar', destination: '/workspace' }); setMobileMenuOpen(false) }}
324+
onClick={() => {
325+
trackLandingCta({
326+
label: 'Go to App',
327+
section: 'navbar',
328+
destination: '/workspace',
329+
})
330+
setMobileMenuOpen(false)
331+
}}
311332
aria-label='Go to app'
312333
>
313334
Go to App
@@ -317,15 +338,25 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
317338
<Link
318339
href='/login'
319340
className='flex h-[32px] items-center justify-center rounded-[5px] border border-[var(--landing-border-strong)] text-[14px] text-[var(--landing-text)] transition-colors active:bg-[var(--landing-bg-elevated)]'
320-
onClick={() => { trackLandingCta({ label: 'Log in', section: 'navbar', destination: '/login' }); setMobileMenuOpen(false) }}
341+
onClick={() => {
342+
trackLandingCta({ label: 'Log in', section: 'navbar', destination: '/login' })
343+
setMobileMenuOpen(false)
344+
}}
321345
aria-label='Log in'
322346
>
323347
Log in
324348
</Link>
325349
<Link
326350
href='/signup'
327351
className='flex h-[32px] items-center justify-center rounded-[5px] border border-[var(--white)] bg-[var(--white)] text-[14px] text-black transition-colors active:bg-[#E0E0E0]'
328-
onClick={() => { trackLandingCta({ label: 'Get started', section: 'navbar', destination: '/signup' }); setMobileMenuOpen(false) }}
352+
onClick={() => {
353+
trackLandingCta({
354+
label: 'Get started',
355+
section: 'navbar',
356+
destination: '/signup',
357+
})
358+
setMobileMenuOpen(false)
359+
}}
329360
aria-label='Get started with Sim'
330361
>
331362
Get started

apps/sim/app/(landing)/components/pricing/pricing.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ function PricingCard({ tier }: PricingCardProps) {
151151
<button
152152
type='button'
153153
className='flex h-[32px] w-full items-center justify-center rounded-[5px] border border-[var(--landing-border-light)] bg-transparent px-2.5 font-[430] font-season text-[14px] text-[var(--landing-text-dark)] transition-colors hover:bg-[var(--landing-bg-hover)]'
154-
onClick={() => trackLandingCta({ label: tier.cta.label, section: 'pricing', destination: 'demo_modal' })}
154+
onClick={() =>
155+
trackLandingCta({
156+
label: tier.cta.label,
157+
section: 'pricing',
158+
destination: 'demo_modal',
159+
})
160+
}
155161
>
156162
{tier.cta.label}
157163
</button>
@@ -160,15 +166,27 @@ function PricingCard({ tier }: PricingCardProps) {
160166
<Link
161167
href={tier.cta.href || '/signup'}
162168
className='flex h-[32px] w-full items-center justify-center rounded-[5px] border border-[#1D1D1D] bg-[#1D1D1D] px-2.5 font-[430] font-season text-[14px] text-white transition-colors hover:border-[var(--landing-border)] hover:bg-[var(--landing-bg-elevated)]'
163-
onClick={() => trackLandingCta({ label: tier.cta.label, section: 'pricing', destination: tier.cta.href || '/signup' })}
169+
onClick={() =>
170+
trackLandingCta({
171+
label: tier.cta.label,
172+
section: 'pricing',
173+
destination: tier.cta.href || '/signup',
174+
})
175+
}
164176
>
165177
{tier.cta.label}
166178
</Link>
167179
) : (
168180
<Link
169181
href={tier.cta.href || '/signup'}
170182
className='flex h-[32px] w-full items-center justify-center rounded-[5px] border border-[var(--landing-border-light)] px-2.5 font-[430] font-season text-[14px] text-[var(--landing-text-dark)] transition-colors hover:bg-[var(--landing-bg-hover)]'
171-
onClick={() => trackLandingCta({ label: tier.cta.label, section: 'pricing', destination: tier.cta.href || '/signup' })}
183+
onClick={() =>
184+
trackLandingCta({
185+
label: tier.cta.label,
186+
section: 'pricing',
187+
destination: tier.cta.href || '/signup',
188+
})
189+
}
172190
>
173191
{tier.cta.label}
174192
</Link>

apps/sim/app/(landing)/landing-analytics.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export function LandingAnalytics() {
1919
* Fire-and-forget tracker for landing page CTA clicks.
2020
* Uses the non-hook client so it works in any click handler without requiring a PostHog provider ref.
2121
*/
22-
export function trackLandingCta(
23-
props: PostHogEventMap['landing_cta_clicked']
24-
): void {
22+
export function trackLandingCta(props: PostHogEventMap['landing_cta_clicked']): void {
2523
captureClientEvent('landing_cta_clicked', props)
2624
}

0 commit comments

Comments
 (0)