mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 17:24:30 +00:00
- Integrate @formbricks/js for future surveys (FormbricksProvider) - Add WebhookForm component for unified form submission (contact/franchise/membership) - Update contact form with reason dropdown field - Update franchise form with new fields: estado, ciudad, socios checkbox - Update franchise benefits: manuals, training platform, RH system, investment $100k - Add Contacto link to desktop/mobile nav and footer - Update membership form to use WebhookForm with membership_id select - Update hero buttons to use #3E352E color consistently - Refactor contact/franchise pages to use new hero layout and components - Add webhook utility (lib/webhook.ts) for parallel submission to test+prod - Add email receipt hooks to booking endpoints - Update globals.css with new color variables and navigation styles - Docker configuration for deployment
29 lines
793 B
TypeScript
29 lines
793 B
TypeScript
'use client'
|
|
|
|
import { useEffect } from 'react'
|
|
import { usePathname, useSearchParams } from 'next/navigation'
|
|
import formbricks from '@formbricks/js'
|
|
|
|
const FORMBRICKS_ENVIRONMENT_ID = process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID || ''
|
|
const FORMBRICKS_API_HOST = process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST || 'https://app.formbricks.com'
|
|
|
|
export function FormbricksProvider() {
|
|
const pathname = usePathname()
|
|
const searchParams = useSearchParams()
|
|
|
|
useEffect(() => {
|
|
if (typeof window !== 'undefined' && FORMBRICKS_ENVIRONMENT_ID) {
|
|
formbricks.init({
|
|
environmentId: FORMBRICKS_ENVIRONMENT_ID,
|
|
apiHost: FORMBRICKS_API_HOST
|
|
})
|
|
}
|
|
}, [])
|
|
|
|
useEffect(() => {
|
|
formbricks?.registerRouteChange()
|
|
}, [pathname, searchParams])
|
|
|
|
return null
|
|
}
|