Skip to content

Commit

Permalink
Remove Excess Conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
rakib committed Feb 25, 2023
1 parent 79303bb commit 840675f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions components/board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,10 @@ function Board(props) {
// }

useEffect(() => {
if (dev()) {
if (updates > 0) {
console.log(`Save Board`);
localStorage.setItem(`board`, JSON.stringify(board));
};
} else {
if (updates > 0) {
console.log(`Save Board`);
localStorage.setItem(`board`, JSON.stringify(board));
};
}
if (updates > 0) {
dev() && board?.columnOrder && board?.columnOrder.length > 0 && console.log(`Updated Board`, board);
localStorage.setItem(`board`, JSON.stringify(board));
};

let boardColumnItems = document.querySelectorAll(`.boardColumnItems`);
boardColumnItems.forEach(columnItems => {
Expand Down

1 comment on commit 840675f

@vercel
Copy link

@vercel vercel bot commented on 840675f Feb 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.