+
-
diff --git a/frontend/src/components/NavBar/NavBarDropdown.tsx b/frontend/src/components/NavBar/NavBarDropdown.tsx
index 01eeeb5f..7ff1a4e3 100644
--- a/frontend/src/components/NavBar/NavBarDropdown.tsx
+++ b/frontend/src/components/NavBar/NavBarDropdown.tsx
@@ -4,7 +4,7 @@ import { signOut } from "next-auth/react";
import { LogOut } from "react-feather";
import { useOutsideClick } from "@/hooks/useOutsideClick";
-export default function NavBarDropdown(props: { initials: string }) {
+export default function NavBarDropdown(props: { initial: string }) {
const [isOpen, setIsOpen] = useState
(false);
const menuRef = useRef(null);
@@ -15,14 +15,16 @@ export default function NavBarDropdown(props: { initials: string }) {
return (
<>
-
+
name.charAt(0).toUpperCase())
- .join("")
- : "NN";
+ const initial =
+ session && session.user && session.user.name ? session.user.name[0] : "N";
- return ;
+ return ;
}