filters fix for search/category page
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import React, { Suspense } from 'react'
|
||||
import type { Metadata } from 'next'
|
||||
import SearchCard from '../components/SearchCard'
|
||||
import { SearchCardProps, SearchPageProps } from '@/app/types'
|
||||
import { SearchPageProps } from '@/app/types'
|
||||
import { fetchRoutes } from '@/lib/search/fetchRoutes'
|
||||
import SearchFilters from '../components/SearchFilters'
|
||||
import AddressSelector from '@/components/AddressSelector'
|
||||
import ClientResults from '../components/ClientResults'
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
return {
|
||||
@@ -62,15 +61,9 @@ export default async function SearchPage(props: SearchPageProps) {
|
||||
: 'Поиск посылки - все предложения'}
|
||||
</h1>
|
||||
<AddressSelector is_search={true} />
|
||||
<SearchFilters />
|
||||
|
||||
<Suspense fallback={<div>Загрузка результатов...</div>}>
|
||||
<div className="space-y-4">
|
||||
{results.length > 0 ? (
|
||||
results.map((item: SearchCardProps) => <SearchCard key={item.id} {...item} />)
|
||||
) : (
|
||||
<div className="text-center text-gray-500">Объявления не найдены</div>
|
||||
)}
|
||||
</div>
|
||||
<ClientResults initialResults={results} />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user