- The callback dialog switches its copy outside business hours (shared/business-hours.ts); such leads get a "нерабочее время" tag, a marker in the deal name and a line in the note in amoCRM. - utm_*, yclid and gclid are read on page load and kept for 30 days (src/lib/attribution.ts), last tagged visit wins, and are sent with every lead. - The callback dialog is rebuilt: focus trap, focus return, phone masking and a full-number check. - fitnes drops the floating MobileCta; header and mobile bars follow the new dialog state in the other three. - Add the latest design mockups under legacy/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
import { useCallback, useRef, useState } from 'react'
|
|
import { BenefitsSection } from './components/BenefitsSection'
|
|
import { CallbackModal } from './components/CallbackModal'
|
|
import { EconomicsSection } from './components/EconomicsSection'
|
|
import { EquipmentSection } from './components/EquipmentSection'
|
|
import { FormatsSection } from './components/FormatsSection'
|
|
import { GuestsSection } from './components/GuestsSection'
|
|
import { Hero } from './components/Hero'
|
|
import { RequestSection } from './components/RequestSection'
|
|
import { SiteFooter } from './components/SiteFooter'
|
|
import { SiteHeader } from './components/SiteHeader'
|
|
import { WhyExoSection } from './components/WhyExoSection'
|
|
import { useAnchorScroll } from './hooks/useAnchorScroll'
|
|
import { useScrolled } from './hooks/useScrollState'
|
|
import { isWithinBusinessHours } from '../shared/business-hours'
|
|
|
|
export default function App() {
|
|
const headerRef = useRef<HTMLElement>(null)
|
|
const scrolled = useScrolled()
|
|
useAnchorScroll(headerRef)
|
|
|
|
// null while closed; otherwise whether it was opened outside business hours.
|
|
const [callback, setCallback] = useState<{ afterHours: boolean } | null>(null)
|
|
const openCallback = useCallback(() => setCallback({ afterHours: !isWithinBusinessHours() }), [])
|
|
const closeCallback = useCallback(() => setCallback(null), [])
|
|
|
|
return (
|
|
<>
|
|
<SiteHeader
|
|
scrolled={scrolled}
|
|
headerRef={headerRef}
|
|
callbackOpen={callback !== null}
|
|
onCallbackClick={openCallback}
|
|
/>
|
|
|
|
<main>
|
|
<Hero />
|
|
<BenefitsSection />
|
|
<EconomicsSection />
|
|
<GuestsSection />
|
|
<FormatsSection />
|
|
<EquipmentSection />
|
|
<WhyExoSection />
|
|
<RequestSection />
|
|
</main>
|
|
|
|
<SiteFooter />
|
|
<CallbackModal open={callback !== null} afterHours={callback?.afterHours ?? false} onClose={closeCallback} />
|
|
</>
|
|
)
|
|
}
|