fix: read vertical param from URL for demo routing
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user