Skip to content

Commit

Permalink
add performance enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
Alforoan committed Sep 8, 2024
1 parent d307508 commit 5d3f0af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import WelcomeMessage from "../components/WelcomMessage";
const Home: React.FC = () => {
const {
selectedBoard,
setSelectedBoard,
selectedCard,
userBoards,
setUserBoards,
Expand Down Expand Up @@ -231,7 +232,9 @@ const Home: React.FC = () => {
<GridItem key={i} cursor="pointer">
<BoardPreview
handleSelectBoard={async() => {
navigate(`/boards/${board?.uuid}`);
// const fetchedBoard = await getBoard(board?.uuid, false);
setSelectedBoard(board);
const fetchedCards = await getCards(board?.uuid, false);
fetchedCards!.unshift(newCard);
// const updatedBoard = {
Expand All @@ -241,7 +244,7 @@ const Home: React.FC = () => {
// if(updatedBoard){
// setSelectedBoard(fetchedBoard);
// }
navigate(`/boards/${board?.uuid}`);

// if(updatedBoard){
// console.log('UPDATED BOARD HERE NOW ', updatedBoard);

Expand Down

0 comments on commit 5d3f0af

Please sign in to comment.