update 5 files

master
Reza_ashrafi 2 years ago
parent ef69dbe468
commit b442d23e50
  1. 2
      src/components/Empty/index.js
  2. 2
      src/views/Dashboard/layouts/Main/index.js
  3. 15
      src/views/Favorites/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)" }}
>
<strong className="text-lg font-bold text-gray1">{text}</strong>
<strong className="text-lg lg:text-tiny font-bold text-gray1">{text}</strong>
{buttonText && (
<button
className="transform translate-y-7 py-2 px-6 text-base rounded-md bg-blueC0 text-white cursor-pointer"

@ -22,7 +22,7 @@ const views = {
</div>
</div>
),
favorites: <Favorites />,
bookmarks: <Favorites />,
addresses: <Addresses isDashboard={true} />,
profile: <Profile />,
addressForm: <Address isDashboard={true} />,

@ -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,
@ -26,10 +29,14 @@ const Favorites = ({
}, []);
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>
);
};

Loading…
Cancel
Save