diff --git a/src/components/Empty/index.js b/src/components/Empty/index.js index e54327b..b5eb611 100644 --- a/src/components/Empty/index.js +++ b/src/components/Empty/index.js @@ -7,7 +7,7 @@ export const Empty = ({ text, buttonText, buttonAction }) => { className="flex-1 flex flex-col justify-center items-center " style={{ minHeight: "calc(100vh - 120px)" }} > - {text} + {text} {buttonText && ( ), - favorites: , + bookmarks: , addresses: , profile: , addressForm: , diff --git a/src/views/Favorites/index.js b/src/views/Favorites/index.js index abb64dd..0cf83f8 100644 --- a/src/views/Favorites/index.js +++ b/src/views/Favorites/index.js @@ -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 ( - - {bookmarkList.map((bookmark, index) => ( - - ))} + + {bookmarkList?.length ? ( + bookmarkList.map((bookmark, index) => ( + + )) + ) : ( + + )} ); };