use ApartmentsList for displaying apartments in favoutires page

This commit is contained in:
b1ek 2023-05-09 12:29:35 +10:00
parent 85ff547eea
commit fd731ee0e3
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 2 additions and 8 deletions

View File

@ -9,7 +9,6 @@ import CardApartment from '../CardApartament';
*/
export default function ApartmentsList(props) {
const list = props.list;
console.log(list);
return (
<div>

View File

@ -1,9 +1,9 @@
import React, { useEffect, useState } from 'react';
import ApartamentService from '../../API/ApartamentService';
import ApartmentsList from '../ApartmentsList';
import {useFetching} from '../../hooks/useFetching';
import {getPageCount} from '../../utils/Pages';
import CardApartament from '../CardApartament';
import Pagination from '../UI/Pagination';
const FavoritesApartamentsList = () => {
@ -51,12 +51,7 @@ const FavoritesApartamentsList = () => {
{isApartamentsLoading &&
<h1 style={{textAlign: 'center'}}>Идет загрузка...</h1>
}
{apartamentsFavorites.map((apartament, index) =>
<>
<CardApartament results={apartament}/>
<div className="separationLine"></div>
</>
)}
<ApartmentsList list={apartamentsFavorites}/>
<Pagination page={page} changePage={changePage} viewAll={viewAll} totalPages={totalPages}/>
</>
);