Skip to content

Commit

Permalink
modified code according to the requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitg927 committed Jan 17, 2025
1 parent 1e8a480 commit aece0ec
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions frontend/src/components/home/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,6 @@ const HomeDashBoard: React.FC<DashBoardProps> = () => {
}
};

const handleTileClick = (tile) => {
if (
testSections?.length > 0 ||
hasRole(userSessionDetails, "Global Administrator")
) {
setSelectedTile(tile);
} else {
setNotificationVisible(true);
addNotification({
kind: NotificationKinds.warning,
title: intl.formatMessage({ id: "accessDenied.title" }),
message: intl.formatMessage({ id: "accessDenied.message" }),
});
}
};

const handleMaximizeClick = (tile) => {
if (
testSections?.length > 0 ||
Expand Down Expand Up @@ -522,7 +506,7 @@ const HomeDashBoard: React.FC<DashBoardProps> = () => {
<ClickableTile
key={index}
className="dashboard-tile"
onClick={() => handleTileClick(tile)}
onClick={() => handleMaximizeClick(tile)}
>
<h3 className="tile-title">{tile.title}</h3>
<p className="tile-subtitle">{tile.subTitle}</p>
Expand Down

0 comments on commit aece0ec

Please sign in to comment.