Merge pull request #552 from DarkWood312/main

feat(landing): автозаполнение поля контакта из параметра URL (?contact=...)
This commit is contained in:
Fringg
2026-08-18 15:11:35 +03:00

View File

@@ -871,7 +871,8 @@ export default function QuickPurchase() {
const contactKey = `lp_contact_${slug ?? ''}`; const contactKey = `lp_contact_${slug ?? ''}`;
const [contactValue, setContactValue] = useState(() => { const [contactValue, setContactValue] = useState(() => {
try { try {
return localStorage.getItem(contactKey) || ''; const urlContact = new URLSearchParams(window.location.search).get('contact');
return urlContact || localStorage.getItem(contactKey) || '';
} catch { } catch {
return ''; return '';
} }