import axios from 'axios'; import Head from 'next/head'; import Link from 'next/link'; import React from 'react'; import LayoutGuest from '../layouts/Guest'; import { getPageTitle } from '../config'; const fieldClass = 'mt-2 w-full rounded-none border border-[#19192d]/10 bg-white px-4 py-3 text-[#19192d] outline-none focus:border-[#35b7a5] focus:ring-2 focus:ring-[#35b7a5]/15'; type IntakeValues = { name: string; email: string; company: string; role_title: string; goal: string; challenge: string; desired_outcome: string; consent_ai_notes: boolean; }; const emptyValues: IntakeValues = { name: '', email: '', company: '', role_title: '', goal: '', challenge: '', desired_outcome: '', consent_ai_notes: false, }; function FieldLabel({ label, children, }: { label: string; children: React.ReactNode; }) { return ( ); } export default function Intake() { const [values, setValues] = React.useState(emptyValues); const [isSubmitting, setIsSubmitting] = React.useState(false); const [isSubmitted, setIsSubmitted] = React.useState(false); function updateValue(field: keyof IntakeValues, value: string | boolean) { setValues((current) => { return { ...current, [field]: value, }; }); } async function submitIntake(event: React.FormEvent) { event.preventDefault(); setIsSubmitting(true); await axios.post('/coaching-public/intake', { ...values, source: 'website', }); setIsSubmitted(true); setIsSubmitting(false); } return ( <> {getPageTitle('Start coaching')}
Coaching SaaS Workspace Login

Coaching intake

Start with the coaching context that matters.

Share what you want to work on. Your coach can review this, create a client record, and prepare the first session around your goals.

{isSubmitted ? (

Received

Thanks, we have your intake.

Your coach can now review it and create your client workspace.

) : (
updateValue('name', event.target.value) } className={fieldClass} /> updateValue('email', event.target.value) } className={fieldClass} />
updateValue('company', event.target.value) } className={fieldClass} /> updateValue('role_title', event.target.value) } className={fieldClass} />