From 7746f99f806165381c8acecacfab0d9c70fad029 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 13 Jun 2022 11:59:46 +0430 Subject: [PATCH] update src/views/Dashboard/layouts/SidebarMenu/index.js --- .../Dashboard/layouts/SidebarMenu/index.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/Dashboard/layouts/SidebarMenu/index.js b/src/views/Dashboard/layouts/SidebarMenu/index.js index 546aae2..02e4b05 100644 --- a/src/views/Dashboard/layouts/SidebarMenu/index.js +++ b/src/views/Dashboard/layouts/SidebarMenu/index.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import Avatar from "../../../../components/Avatar"; import { connect } from "react-redux"; -import {useNavigate} from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import { publicApi, user, dialog } from "../../../../redux/actions"; import "./index.scss"; @@ -12,7 +12,7 @@ import moon from "./moon.svg"; import sms from "./sms.svg"; import userEdit from "./user-edit.svg"; import dropdownIcon from "../../../../assets/icons/dropdown-blue.svg"; -import myVideosIcon from "./myVideos.svg"; +import myVideosIcon from "./myVideos.svg"; import myBooksIcon from "./myBooks.svg"; import ordersIcon from "./orders.svg"; import favoritesIcon from "./favorites.svg"; @@ -136,10 +136,10 @@ const SidebarMenu = ({ ]; useEffect(() => { - if(!isLogin){ - navigate('/'); + if (!isLogin) { + navigate("/"); } - },[isLogin]); + }, [isLogin]); return (

- {user.firstName + " " + user.lastName} + {`${user.firstName === null ? user.firstName : " "}` + + " " + + user.lastName}

({ const mapDispatchToProps = { setDashboardOptions: publicApi.setDashboardOptions, logout: user.logout, - setDialog : dialog.set, + setDialog: dialog.set, }; export default connect(mapStateToProps, mapDispatchToProps)(SidebarMenu); @@ -222,8 +224,6 @@ SidebarMenu.defaultProps = { icon: sms, title: "پشتیبانی", notification: null, - list: [ - { title: "ثبت نظر", value: "setTicket" }, - ], + list: [{ title: "ثبت نظر", value: "setTicket" }], }, };