{t('isletme')}
marmaris local • {listings.length} {locale === 'tr' ? 'sonuç' : locale === 'en' ? 'results' : 'результатов'}
{t('noResults')}
import { getTranslations, setRequestLocale } from 'next-intl/server' import { mockDb } from '@/lib/mockDb' import ListingCard from '@/components/ListingCard' import { SlidersHorizontal } from 'lucide-react' interface PageProps { params: Promise<{ locale: string }> searchParams: Promise<{ search?: string neighborhood?: string price?: string approved?: string }> } export default async function BusinessesPage({ params, searchParams }: PageProps) { const { locale } = await params setRequestLocale(locale) const { search, neighborhood, price, approved } = await searchParams const t = await getTranslations('categories') // Find Category Isletme const categories = await mockDb.getCategories() const currentCategory = categories.find(c => c.slug === 'isletme') const categoryId = currentCategory?.id // Get active neighborhoods for filter const neighborhoods = await mockDb.getNeighborhoods() // Selected filters const selectedNeighborhoodId = neighborhood || undefined const selectedPriceRange = price ? parseInt(price) : undefined const isApprovedOnly = approved === 'true' const listings = await mockDb.getListings({ categoryId, neighborhoodId: selectedNeighborhoodId, priceRange: selectedPriceRange, isLocalApproved: isApprovedOnly ? true : undefined, search: search }) const getLocalizedName = (obj: any) => { if (!obj) return '' return locale === 'ru' ? obj.nameRu : locale === 'en' ? obj.nameEn : obj.nameTr } return (
marmaris local • {listings.length} {locale === 'tr' ? 'sonuç' : locale === 'en' ? 'results' : 'результатов'}
{t('noResults')}