{status && (
diff --git a/src/components/Banners/index.js b/src/components/Banners/index.js
deleted file mode 100644
index 12305a9..0000000
--- a/src/components/Banners/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import React from "react";
-
-const Banners = ({
- mainBanner,
- leftBanner,
- midTopBanner,
- midBottomBanner,
-}) => {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-
-export default Banners;
\ No newline at end of file
diff --git a/src/components/BottomNavigation/bottom-products-active.svg b/src/components/BottomNavigation/bottom-products-active.svg
deleted file mode 100644
index 9a4c65e..0000000
--- a/src/components/BottomNavigation/bottom-products-active.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-products-deactive.svg b/src/components/BottomNavigation/bottom-products-deactive.svg
deleted file mode 100644
index 875ff38..0000000
--- a/src/components/BottomNavigation/bottom-products-deactive.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-profile-active.svg b/src/components/BottomNavigation/bottom-profile-active.svg
deleted file mode 100644
index 19f103b..0000000
--- a/src/components/BottomNavigation/bottom-profile-active.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-test-active.svg b/src/components/BottomNavigation/bottom-test-active.svg
deleted file mode 100644
index 25845a2..0000000
--- a/src/components/BottomNavigation/bottom-test-active.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-test-deactive.svg b/src/components/BottomNavigation/bottom-test-deactive.svg
deleted file mode 100644
index f040018..0000000
--- a/src/components/BottomNavigation/bottom-test-deactive.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-video-active.svg b/src/components/BottomNavigation/bottom-video-active.svg
deleted file mode 100644
index 6a4b5fd..0000000
--- a/src/components/BottomNavigation/bottom-video-active.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/src/components/BottomNavigation/bottom-video-deactive.svg b/src/components/BottomNavigation/bottom-video-deactive.svg
deleted file mode 100644
index 4250b15..0000000
--- a/src/components/BottomNavigation/bottom-video-deactive.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/src/components/BottomNavigation/index.js b/src/components/BottomNavigation/index.js
index 4595e23..36f1a96 100644
--- a/src/components/BottomNavigation/index.js
+++ b/src/components/BottomNavigation/index.js
@@ -2,43 +2,78 @@ import React, { useState } from "react";
import { NavLink } from "react-router-dom";
import { connect } from "react-redux";
-//assets
-import deactiveHomeIcon from "./bottom-home-deactive.svg";
-import deactiveProductsIcon from "./bottom-products-deactive.svg";
-import deactiveVideoIcon from "./bottom-video-deactive.svg";
-import deactiveProfileIcon from "./bottom-profile-deactive.svg";
-import deactiveTestIcon from "./bottom-test-deactive.svg";
-import activeHomeIcon from "./bottom-home-active.svg";
-import activeTestIcon from "./bottom-test-active.svg";
-import activeProfileIcon from "./bottom-profile-active.svg";
-import activeProductsIcon from "./bottom-products-active.svg";
-import activeVideoIcon from "./bottom-video-active.svg";
-
-export const BottomNavigation = ({ pages, isDark }) => {
+export const BottomNavigation = ({ isDark, user }) => {
const [activeLink, setActiveLink] = useState("/");
const Tab = ({ page }) => {
+ const isActive = activeLink === page.link;
return (
setActiveLink(page.link)}
+ style={{
+ height: 56,
+ }}
>
-
+
{page.name}
);
};
+ const pages = React.useMemo(() => {
+ return [
+ {
+ id: 0,
+ name: window.t("صفحه اصلی"),
+ link: "/",
+ activeIcon: "/assets/icons/home-fill-primary.svg",
+ deactiveIcon: "/assets/icons/home-primary.svg",
+ },
+ {
+ id: 1,
+ name: window.t("محصولات"),
+ link: "/products",
+ activeIcon: "/assets/icons/book-fill-primary.svg",
+ deactiveIcon: "/assets/icons/book-primary.svg",
+ },
+ {
+ id: 2,
+ name: window.t("ویدئو"),
+ link: "/videos",
+ activeIcon: "/assets/icons/video-fill-primary.svg",
+ deactiveIcon: "/assets/icons/video-primary.svg",
+ },
+ {
+ id: 3,
+ name: window.t("سبد خرید"),
+ link: "/cart",
+ activeIcon: "/assets/icons/bag-fill-primary.svg",
+ deactiveIcon: "/assets/icons/bag-primary.svg",
+ },
+ {
+ id: 4,
+ name: window.t("حساب کاربری"),
+ link: user ? "/dashboard" : "/signup",
+ activeIcon: "/assets/icons/user-fill-primary.svg",
+ deactiveIcon: "/assets/icons/user-primary.svg",
+ },
+ ];
+ }, [user]);
return (
<>