|
1 | 1 | 'use client' |
2 | 2 |
|
3 | | -import { Suspense, useMemo, useRef, useState } from 'react' |
| 3 | +import { Suspense, useEffect, useMemo, useRef, useState } from 'react' |
4 | 4 | import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile' |
5 | 5 | import { createLogger } from '@sim/logger' |
6 | 6 | import { Eye, EyeOff, Loader2 } from 'lucide-react' |
7 | 7 | import Link from 'next/link' |
8 | 8 | import { useRouter, useSearchParams } from 'next/navigation' |
| 9 | +import { usePostHog } from 'posthog-js/react' |
9 | 10 | import { Input, Label } from '@/components/emcn' |
10 | 11 | import { client, useSession } from '@/lib/auth/auth-client' |
11 | 12 | import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env' |
@@ -81,7 +82,12 @@ function SignupFormContent({ |
81 | 82 | const router = useRouter() |
82 | 83 | const searchParams = useSearchParams() |
83 | 84 | const { refetch: refetchSession } = useSession() |
| 85 | + const posthog = usePostHog() |
84 | 86 | const [isLoading, setIsLoading] = useState(false) |
| 87 | + |
| 88 | + useEffect(() => { |
| 89 | + posthog?.capture('signup_page_viewed', {}) |
| 90 | + }, [posthog]) |
85 | 91 | const [showPassword, setShowPassword] = useState(false) |
86 | 92 | const [password, setPassword] = useState('') |
87 | 93 | const [passwordErrors, setPasswordErrors] = useState<string[]>([]) |
|
0 commit comments