Skip to content

Commit

Permalink
fixed key prop warning in console
Browse files Browse the repository at this point in the history
  • Loading branch information
okrayum committed Jun 20, 2024
1 parent 1cec325 commit 9446a3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Home: React.FC = () => {

const { getUserBoards } = useGetUserBoards();


useEffect(() => {
// this is where we will fetch all user's boards from the database
const fetchBoards = async () => {
Expand Down Expand Up @@ -141,8 +142,9 @@ const Home: React.FC = () => {
) : (
<div className="text-center">
<ul className="flex flex-row flex-wrap gap-4 justify-center">
{userBoards.map((board) => (
<li key={board.boardId} className="cursor-pointer">
{userBoards.map((board, i) => (
<li key={i}
className="cursor-pointer">
<BoardPreview
handleSelectBoard={handleToggleBoardSelect}
board={board}
Expand Down

0 comments on commit 9446a3d

Please sign in to comment.