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