use ApartmentsList for displaying apartments in favoutires page
This commit is contained in:
parent
85ff547eea
commit
fd731ee0e3
|
@ -9,7 +9,6 @@ import CardApartment from '../CardApartament';
|
|||
*/
|
||||
export default function ApartmentsList(props) {
|
||||
const list = props.list;
|
||||
console.log(list);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
|
@ -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}/>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue