search filter component
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { Suspense } from 'react'
|
||||
import type { Metadata } from 'next'
|
||||
import SearchCard from '../../components/SearchCard'
|
||||
import { SearchCardProps, RouteSearchPageProps } from '@/app/types'
|
||||
import SearchFilters from '../../components/SearchFilters'
|
||||
|
||||
async function fetchSearch(category: string, from: string, to: string) {
|
||||
const response = await fetch(
|
||||
@@ -66,7 +67,7 @@ export default async function SearchPage(props: RouteSearchPageProps) {
|
||||
const { results, count } = await fetchSearch(category, fromCity, toCity)
|
||||
|
||||
return (
|
||||
<div className="container mx-auto p-4">
|
||||
<div className="container mx-auto space-y-10 p-4">
|
||||
<h1 className="mb-4 text-2xl font-bold">
|
||||
{results.length > 0
|
||||
? category === 'mover'
|
||||
@@ -75,6 +76,8 @@ export default async function SearchPage(props: RouteSearchPageProps) {
|
||||
: 'Результаты не найдены'}
|
||||
</h1>
|
||||
|
||||
<SearchFilters />
|
||||
|
||||
<Suspense fallback={<div>Загрузка результатов...</div>}>
|
||||
<div className="space-y-4">
|
||||
{results.length > 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user