Skip to content

Commit

Permalink
Use isAdmin for Dashboards upVote
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpzx committed Nov 27, 2024
1 parent 05bc85a commit 1e9a40a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions frontend/src/modules/Dashboards/views/DashboardView.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ const DashboardView = () => {
</Grid>
<Grid item>
<Box sx={{ m: -1 }}>
<UpVoteButton
upVoted={isUpVoted}
onClick={() => upVoteDashboard(dashboard.dashboardUri)}
upVotes={upVotes || 0}
/>
{isAdmin && (
<UpVoteButton
upVoted={isUpVoted}
onClick={() => upVoteDashboard(dashboard.dashboardUri)}
upVotes={upVotes || 0}
/>
)}
<Button
color="primary"
startIcon={<ForumOutlined fontSize="small" />}
Expand Down

0 comments on commit 1e9a40a

Please sign in to comment.