Skip to content

Commit

Permalink
Merge pull request #85 from GreenGen72/improvement/adm-nvbr
Browse files Browse the repository at this point in the history
Improvement/adm nvbr
  • Loading branch information
devgabrielnascimento authored Jun 4, 2024
2 parents a069e96 + c117291 commit 9fed934
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/assets/Star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Link, useNavigate } from "react-router-dom";
import { AuthContext } from "../../contexts/AuthContext";
import { toastAlerta } from "../../utils/toastAlerta";
import LogoGreenGen from "../../assets/logo_greengen.svg";
import Star from "../../assets/Star.svg";
import wpIcon from "../../assets/logos_whatsapp-icon.svg";
import userIconNB from "../../assets/user_icon_nb.svg";
import userIconNBDB from "../../assets/user_icon_nb_dd.svg";
Expand All @@ -12,6 +13,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faSearch } from "@fortawesome/free-solid-svg-icons/faSearch";
import { CartContext } from "../../contexts/CartContext";


import Avatar from "../avatar/Avatar";

function Navbar() {
Expand Down Expand Up @@ -71,7 +73,8 @@ function Navbar() {
>
<Avatar foto={usuario.foto} bordercolour="white" size="small" />
<ul className="grid justify-items-start">
<li className="text-sm text-white font-light">Olá, </li><li className="text-sm text-white font-bold">{usuario.nome.split(" ")[0].length > 24 ? usuario.nome.replace(/(.{24})..+/, "$1...") : usuario.nome.split(" ")[0]}!</li>

<li className="text-sm text-white font-light">Olá, </li><li className="flex text-sm text-white font-bold">{usuario.nome.split(" ")[0].length > 24 ? usuario.nome.replace(/(.{24})..+/, "$1...") : usuario.nome.split(" ")[0]}!{isAdmin && (<p className="text-accent font-light italic">(Admin)</p>)}{isAdmin && ( <img src={Star} alt="" /> )}</li>
</ul>
</div>
<ul
Expand Down

0 comments on commit 9fed934

Please sign in to comment.