fix: read vertical param from URL for demo routing
This commit is contained in:
@@ -241,10 +241,14 @@ function DemosContent() {
|
||||
|
||||
useEffect(() => {
|
||||
const type = searchParams.get("type");
|
||||
const vertical = searchParams.get("vertical");
|
||||
const name = searchParams.get("name");
|
||||
if (type && ["real-estate", "restaurant", "clinic", "home-services"].includes(type)) {
|
||||
setSelected(type as Vertical);
|
||||
}
|
||||
if (vertical && ["real-estate", "restaurant", "clinic", "home-services"].includes(vertical)) {
|
||||
setSelected(vertical as Vertical);
|
||||
}
|
||||
if (name) {
|
||||
setBusinessName(decodeURIComponent(name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user