Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/components/NavBarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ function NavLinks({
<li className="flex-grow" />
<li>
<p className="px-2 mb-1 text-sm font-medium line-clamp-3 hidden md:block">
<span className="font-normal text-xs text-gray-500">Logged in as</span>
<span className="font-normal text-xs text-gray-500">
Logged in as
</span>
<br />
{isPartnerUser ? (user?.siteName ?? user?.name) : user?.name }
{isPartnerUser ? (user?.siteName ?? user?.name) : user?.name}
</p>
</li>
<ul className="flex gap-2">
Expand All @@ -203,7 +205,11 @@ function NavLinks({
)}
<li className="flex-shrink-0 mt-auto">
<NavLink
onClick={signOut}
onClick={() => {
// Clear cached chat notifications from sessionStorage on logout
sessionStorage.removeItem("chat_notifications");
signOut();
}}
icon={<SignOut size={22} />}
className="border-red-primary border rounded text-red-primary hover:bg-red-primary/10 transition-all duration-100 !w-auto"
noWrapper
Expand Down Expand Up @@ -264,7 +270,7 @@ function getPortalLabel(isPartnerUser: boolean, isSuper?: boolean) {
if (isPartnerUser) return "Partner Portal";
if (isSuper) return "Admin Portal";

return "Staff Portal";
return "Staff Portal";
}

function DesktopNavbar() {
Expand Down
5 changes: 5 additions & 0 deletions src/components/dashboard/FloatingNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import { useState } from "react";
import { Bell } from "@phosphor-icons/react";
import NotificationsPanel from "./NotificationsPanel";
import { useNotifications } from "../NotificationHandler";
import { useUser } from "../context/UserContext";

export default function FloatingNotification() {
const { user } = useUser();
const { notifications } = useNotifications();
const [isPanelOpen, setIsPanelOpen] = useState(false);
// Don't show notification bell on login page or when not authenticated
if (!user) return null;

const unreadCount = notifications.length;

return (
Expand Down
Loading