/** * Viewer city for discovery lists (home popular/category, category landing). * * - Guest / incomplete profile → no city filter (nationwide — marketing cold start) * - Logged-in with `profile.cityId` → that city * * City-scoped URLs (`/city/...`, category+city combo) always use the URL city * and do not call this helper. Home city-preview strip is separate (cookie). */ export function resolveViewerDiscoveryCityId(profileCityId: number | null | undefined, isLoggedIn: boolean): number | undefined { if (!isLoggedIn) return undefined if (profileCityId == null) return undefined return profileCityId }