diff --git a/resources/scripts/components/NavigationBar.tsx b/resources/scripts/components/NavigationBar.tsx index 62bd078..a9a54e7 100644 --- a/resources/scripts/components/NavigationBar.tsx +++ b/resources/scripts/components/NavigationBar.tsx @@ -4,6 +4,7 @@ import { Link, NavLink } from 'react-router-dom'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCogs, faLayerGroup, faSignOutAlt } from '@fortawesome/free-solid-svg-icons'; import { useStoreState } from 'easy-peasy'; +import { useTranslation } from 'react-i18next'; import { ApplicationStore } from '@/state'; import SearchContainer from '@/components/dashboard/search/SearchContainer'; import tw, { theme } from 'twin.macro'; @@ -13,10 +14,6 @@ import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import Tooltip from '@/components/elements/tooltip/Tooltip'; import Avatar from '@/components/Avatar'; -import BeforeNavigation from '@/blueprint/components/Navigation/NavigationBar/BeforeNavigation'; -import AdditionalItems from '@/blueprint/components/Navigation/NavigationBar/AdditionalItems'; -import AfterNavigation from '@/blueprint/components/Navigation/NavigationBar/AfterNavigation'; - const RightNavigation = styled.div` & > a, & > button, @@ -37,8 +34,10 @@ const RightNavigation = styled.div` `; export default () => { + const { t } = useTranslation('strings'); + const name = useStoreState((state: ApplicationStore) => state.settings.data!.name); - const rootAdmin = useStoreState((state: ApplicationStore) => state.user.data!.rootAdmin); + const isAdmin = useStoreState((state: ApplicationStore) => state.user.data!.admin); const [isLoggingOut, setIsLoggingOut] = useState(false); const onTriggerLogout = () => { @@ -50,7 +49,7 @@ export default () => { }; return ( -