Files
accounted/components/RecaptIdentify.tsx
T
Jakob Wennberg 497ef876bb feat: add Recapt analytics, remove push-notifications extension, UI fixes
- Integrate Recapt session tracking with user identity in dashboard layout
- Remove push-notifications extension from settings, panel registry, and toggle list
- Fix journal entry preview overflow on narrow viewports
- Update transaction manual booking button label
- Clarify invoice email error message to reference env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:12:26 +01:00

46 lines
799 B
TypeScript

'use client'
import { useEffect } from 'react'
declare global {
interface Window {
Recapt?: {
session: {
setIdentity: (identity: {
uid: string
email?: string
nickname?: string
fullName?: string
}) => void
}
}
}
}
export function RecaptIdentify({
userId,
email,
displayName,
}: {
userId: string
email?: string
displayName?: string
}) {
useEffect(() => {
const interval = setInterval(() => {
if (window.Recapt) {
window.Recapt.session.setIdentity({
uid: userId,
email: email,
fullName: displayName,
})
clearInterval(interval)
}
}, 500)
return () => clearInterval(interval)
}, [userId, email, displayName])
return null
}