Merge branch 'main' into feat/role-management-fixes

This commit is contained in:
Davor 2022-06-10 10:26:15 +02:00
commit 7691223a9c
4 changed files with 12 additions and 3 deletions

View file

@ -26,6 +26,8 @@ function filterNavigationByDashboardRole(isAdmin: boolean) {
return navigation.filter((item) => !item.requiresAdmin);
}
const HYDRA_URL = process.env.REACT_APP_HYDRA_PUBLIC_URL;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface HeaderProps {}
@ -48,6 +50,8 @@ const Header: React.FC<HeaderProps> = () => {
const navigationItems = filterNavigationByDashboardRole(isAdmin);
const signOutUrl = `${HYDRA_URL}/oauth2/sessions/logout`;
return (
<>
<Disclosure as="nav" className="bg-white shadow relative z-10">
@ -127,7 +131,8 @@ const Header: React.FC<HeaderProps> = () => {
<Menu.Item>
{({ active }) => (
<a
onClick={logOut}
onClick={() => logOut()}
href={signOutUrl}
className={classNames(
active ? 'bg-gray-100 cursor-pointer' : '',
'block px-4 py-2 text-sm text-gray-700 cursor-pointer',