Skip to content

Commit

Permalink
Fixing onClick bug
Browse files Browse the repository at this point in the history
  • Loading branch information
emily-yarvis committed Feb 18, 2025
1 parent aae0dc2 commit 7e6b009
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/POICardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ export default function POICardList() {
></div>
))}
<button
onClick={() => toggleComplete(POI._id)}
onClick={(e) => {
e.preventDefault();
toggleComplete(POI._id);
}}
className={`w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors ${
POI.isComplete ? styles.POIchecked : styles.POIdefault
}`}
Expand Down

0 comments on commit 7e6b009

Please sign in to comment.