import { AppstoreOutlined, HomeOutlined, SearchOutlined, BellOutlined, BankOutlined, DownOutlined, } from "@ant-design/icons"; import { Dropdown } from "antd"; import { useAppDispatch, useAppSelector } from "@/store"; import { logout } from "@/store/authSlice"; import { resetTabs, setActiveTab } from "@/store/tabsSlice"; import { useNavigate } from "react-router-dom"; interface Props { onOpenMegaNav: () => void; } export default function TopBar({ onOpenMegaNav }: Props) { const auth = useAppSelector((s) => s.auth); const dispatch = useAppDispatch(); const navigate = useNavigate(); const onLogout = () => { dispatch(logout()); dispatch(resetTabs()); navigate("/login", { replace: true }); }; const goHome = () => { dispatch(setActiveTab("home")); }; return (
XLY-ERP · {auth.companyName ?? ""}
); } function Brand() { return ( ); }