From c37eac702e60ed295ee887259f4181221d57830e Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 24 Jan 2025 12:29:07 +0100 Subject: [PATCH] - added company name to topbar; --- src/layouts/DefaultLayout/components/AppTopbar/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/layouts/DefaultLayout/components/AppTopbar/index.js b/src/layouts/DefaultLayout/components/AppTopbar/index.js index 8aae5f8..91ed853 100644 --- a/src/layouts/DefaultLayout/components/AppTopbar/index.js +++ b/src/layouts/DefaultLayout/components/AppTopbar/index.js @@ -7,15 +7,21 @@ import LogoIcon from '../../../../icons/LogoIcon'; import { Button } from 'primereact/button'; import TopBarProfileMenu from '../../../../components/TopBarProfileMenu'; import NotificationsSidebar from '../../../../components/NotificationsSidebar'; +import { useStore } from '../../../../store'; +import { head } from 'ramda'; const AppTopbar = () => { const menuLeft = useRef(null); + const companies = useStore().main.companies(); + const chosenCompanyId = useStore().main.chosenCompanyId(); + const company = head(companies.filter(o => o.id === chosenCompanyId)); const startContent = ; const endContent =
+ {company ? {company.companyName} : null} {/*