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}