feat: implement root domain handling for nobat724.com to prevent city filtering
This commit is contained in:
+4
-1
@@ -4,6 +4,9 @@ import { headers } from "next/headers";
|
||||
import citiesData from "@/data/city.json";
|
||||
import statesData from "@/data/state.json";
|
||||
|
||||
import { ROOT_CITY_ID, isRootCity } from "@/lib/rootCity";
|
||||
export { ROOT_CITY_ID, isRootCity };
|
||||
|
||||
export async function getStateInfo() {
|
||||
const headersList = await headers();
|
||||
|
||||
@@ -20,5 +23,5 @@ export async function getStateInfo() {
|
||||
matchedCity &&
|
||||
statesData.find((state) => state.id === matchedCity.province_id);
|
||||
|
||||
return { matchedCity, matchedState };
|
||||
return { matchedCity, matchedState, isRoot: isRootCity(matchedCity) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user