fix: read vertical param from URL for demo routing

This commit is contained in:
root
2026-02-19 12:31:57 +00:00
parent 245e924530
commit 0dda4514ea
+4
View File
@@ -241,10 +241,14 @@ function DemosContent() {
useEffect(() => { useEffect(() => {
const type = searchParams.get("type"); const type = searchParams.get("type");
const vertical = searchParams.get("vertical");
const name = searchParams.get("name"); const name = searchParams.get("name");
if (type && ["real-estate", "restaurant", "clinic", "home-services"].includes(type)) { if (type && ["real-estate", "restaurant", "clinic", "home-services"].includes(type)) {
setSelected(type as Vertical); setSelected(type as Vertical);
} }
if (vertical && ["real-estate", "restaurant", "clinic", "home-services"].includes(vertical)) {
setSelected(vertical as Vertical);
}
if (name) { if (name) {
setBusinessName(decodeURIComponent(name)); setBusinessName(decodeURIComponent(name));
} }