feat: implement root domain handling for nobat724.com to prevent city filtering

This commit is contained in:
hamed
2026-07-02 21:53:45 +03:30
parent e6b55c6bad
commit 79f7df2e4d
9 changed files with 196 additions and 24 deletions
+4 -1
View File
@@ -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) };
}