|
|
|
@ -6,6 +6,9 @@ import { publicApi, userFavorite } from "../../redux/actions"; |
|
|
|
|
import bookImage from "./book.svg"; |
|
|
|
|
import bookmarkIcon from "./bookmark.svg"; |
|
|
|
|
|
|
|
|
|
//components
|
|
|
|
|
import Empty from "../../components/Empty"; |
|
|
|
|
|
|
|
|
|
const Favorites = ({ |
|
|
|
|
bookmarkList, |
|
|
|
|
isMobile, |
|
|
|
@ -24,12 +27,16 @@ const Favorites = ({ |
|
|
|
|
// alert();
|
|
|
|
|
window.scrollTo(0, 0); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="flex flex-wrap"> |
|
|
|
|
{bookmarkList.map((bookmark, index) => ( |
|
|
|
|
<Bookmark key={index} bookmark={bookmark} /> |
|
|
|
|
))} |
|
|
|
|
<div className="flex flex-wrap flex-1"> |
|
|
|
|
{bookmarkList?.length ? ( |
|
|
|
|
bookmarkList.map((bookmark, index) => ( |
|
|
|
|
<Bookmark key={index} bookmark={bookmark} /> |
|
|
|
|
)) |
|
|
|
|
) : ( |
|
|
|
|
<Empty text="هیج موردی در علاقهمندیهای شما وجود ندارد." /> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|