Skip to content

Commit

Permalink
fix: wallet 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sseooh committed Nov 15, 2024
1 parent 92c4d3f commit 15eb63e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/main/resources/static/js/card/card-list-delete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function deleteCardFromGroup(button) {
function deleteCardFromGroup(button, event) {
event.stopPropagation();

const cardId = button.getAttribute('card-id');
const groupId = getCurrentGroupId();

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/static/js/card/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function populateCardSection(data, container) {
cardElement.id = `card-${data.id}`;

cardElement.innerHTML = `
<button class="delete-button" th:attr="card-id=${data.id}" onclick="deleteCardFromGroup(this, event)">삭제</button>
<div class="card-image">
<img src="${data.profileImg}" alt="Person profile">
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/main/resources/templates/card-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ <h2 class="title">[[${group.name}]]</h2>
<div class="card-list">
<!-- 카드 목록을 동적으로 생성 -->
<div th:each="card : ${cards}">
<div th:replace="card :: cardSection(${card.id})">
<button class="delete-button" th:attr="card-id=${card.id}" onclick="deleteCardFromGroup(this)">삭제</button>
</div>
<div th:replace="card :: cardSection(${card.id})"></div>
</div>
</div>
</div>
Expand Down

0 comments on commit 15eb63e

Please sign in to comment.