Skip to content
Snippets Groups Projects
Commit 68bb697f authored by xaralis's avatar xaralis
Browse files

fix: display chairman actions on home only for chairman

parent 10de10d1
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,8 @@ const Home = () => { ...@@ -143,6 +143,8 @@ const Home = () => {
return <BreakInProgress />; return <BreakInProgress />;
} }
const displayActions = isAuthenticated && user.role === "chairman";
return ( return (
<> <>
<article className="container container--wide pt-8 lg:py-24 cf2021"> <article className="container container--wide pt-8 lg:py-24 cf2021">
...@@ -151,6 +153,7 @@ const Home = () => { ...@@ -151,6 +153,7 @@ const Home = () => {
<h1 className="head-alt-md lg:head-alt-lg mb-0"> <h1 className="head-alt-md lg:head-alt-lg mb-0">
Bod č. {programEntry.number}: {programEntry.title} Bod č. {programEntry.number}: {programEntry.title}
</h1> </h1>
{displayActions && (
<DropdownMenu right triggerSize="lg" className="pl-4"> <DropdownMenu right triggerSize="lg" className="pl-4">
<DropdownMenuItem <DropdownMenuItem
onClick={() => setShowProgramEditModal(true)} onClick={() => setShowProgramEditModal(true)}
...@@ -184,8 +187,8 @@ const Home = () => { ...@@ -184,8 +187,8 @@ const Home = () => {
titleSize="base" titleSize="base"
iconSize="base" iconSize="base"
/> />
)}
</DropdownMenu> </DropdownMenu>
)}
</div> </div>
<iframe <iframe
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment