Skip to content

Commit

Permalink
fix: editing / deleting null boards
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-Web3 committed Jul 22, 2023
1 parent dd4cd67 commit b09cd1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/shared/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,22 @@ const Header: React.FC<{
transition={{ duration: 0.25 }}
className="header__dropdown"
>
{
//NOTE p tag, disabled class used due to defect in button element styling
}
<p
onClick={() =>
currentBoard &&
setModalType({ modalType: 'edit-board', showModal: true })
}
className="dropdown__option"
className={`dropdown__option ${!currentBoard && 'disabled'}`}
>
edit board
</p>
<p
className="dropdown__option"
className={`dropdown__option ${!currentBoard && 'disabled'}`}
onClick={() =>
currentBoard &&
setModalType({ modalType: 'delete-board', showModal: true })
}
>
Expand Down
3 changes: 3 additions & 0 deletions src/sass/shared/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
padding-right: $spacer * 3;
border-radius: 3px;

&.disabled {
cursor: not-allowed;
}
&:hover {
background-color: $gray-100;
}
Expand Down

0 comments on commit b09cd1e

Please sign in to comment.