Add after-hours callbacks and persistent ad attribution to all four landings
- 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>
This commit is contained in:
1 parent
56ff5839b8
commit
a61d53962a
145 files changed
+9242
-523
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useEffect, useState, type MouseEvent } from 'react'
|
||||
import { isWithinBusinessHours } from '../../shared/business-hours'
|
||||
import { contacts } from '../data/content'
|
||||
import { cx } from '../lib/cx'
|
||||
import { reportCallClick } from '../lib/lead'
|
||||
@@ -14,9 +15,20 @@ import { PhoneIcon } from './Icons'
|
||||
* top of the fields it points at. That also keeps it clear of the submit
|
||||
* button, which is the one control it could plausibly be mistaken for.
|
||||
*/
|
||||
export function MobileActionBar() {
|
||||
export function MobileActionBar({ onAfterHoursCall }: { onAfterHoursCall: () => void }) {
|
||||
const [shown, setShown] = useState(false)
|
||||
|
||||
// Nobody answers out of hours, so the number opens the callback form instead
|
||||
// of the dialler — and is not reported as a call, since none happens.
|
||||
const onPhoneClick = (event: MouseEvent<HTMLAnchorElement>) => {
|
||||
if (isWithinBusinessHours()) {
|
||||
reportCallClick()
|
||||
return
|
||||
}
|
||||
event.preventDefault()
|
||||
onAfterHoursCall()
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const hero = document.getElementById('top')
|
||||
const form = document.getElementById('proposal')
|
||||
@@ -53,7 +65,7 @@ export function MobileActionBar() {
|
||||
<div className="flex items-center gap-[10px]">
|
||||
<a
|
||||
href={contacts.phoneHref}
|
||||
onClick={reportCallClick}
|
||||
onClick={onPhoneClick}
|
||||
aria-label={`Позвонить в Экзо Групп по номеру ${contacts.phone}`}
|
||||
className={buttonClass('call', 'shrink-0', 'min-h-[52px] w-[52px] px-0')}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user