Skip to content

Commit 3bb4bc5

Browse files
authored
Fix: 배포 전 이슈를 해결한다 (#85)
* fix: cameCase 에러를 고친다 * fix: 컴포넌트 key값을 추가한다 * fix: 배포를 위해 `window.confirm`로 바꾼다
1 parent 12ca3a9 commit 3bb4bc5

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

packages/web/src/app/memos/components/MemoGrid.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ export default function MemoGrid() {
7373
}}>
7474
{items.map((item, index) => (
7575
<motion.div
76+
key={item.key}
7677
initial={{ opacity: 0, y: 20, scale: 0.8 }}
7778
animate={{ opacity: 1, y: 0, scale: 1 }}
7879
transition={{ duration: 0.3, delay: index < 5 ? 0 : Math.min(index * 0.05, 0.5) }}>
7980
<MemoItem
8081
data-grid-groupkey={item.groupKey}
81-
key={item.key}
8282
memo={memoList.at(item.key)}
8383
onMouseEnter={handleMouseEnter}
8484
onMouseLeave={handleMouseLeave}
@@ -99,15 +99,10 @@ function MemoItem({ isHovered, memo, ...props }: MemoItemProps) {
9999
if (!memo) return null;
100100
const { mutate: mutateMemoDelete } = useMemoDeleteMutation();
101101

102-
const handleDeleteConfirmClick = async () => {
103-
mutateMemoDelete(memo.id);
104-
toast.success('삭제가 완료되었습니다.');
105-
};
106-
107102
const handleDeleteClick = () => {
108-
const modalEl = document.getElementById(MEMO_DELETE_MODAL_ID) as HTMLDialogElement;
109-
if (!modalEl) return;
110-
modalEl.showModal();
103+
const answer = window.confirm('정말로 메모를 삭제하시겠습니까? 복구는 불가능합니다.');
104+
if (!answer) return;
105+
mutateMemoDelete(memo.id);
111106
};
112107

113108
return (
@@ -140,7 +135,6 @@ function MemoItem({ isHovered, memo, ...props }: MemoItemProps) {
140135
''
141136
)}
142137
</div>
143-
<MemoDeleteModal onMemoDeleteConfirmClick={handleDeleteConfirmClick} />
144138
</div>
145139
);
146140
}

packages/web/src/app/memos/components/MemoRefresh.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export default function MemoRefresh({ ...props }: MemoRefreshProps) {
2828
<path
2929
d="M21 3V8M21 8H16M21 8L18 5.29168C16.4077 3.86656 14.3051 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.2832 21 19.8675 18.008 20.777 14"
3030
stroke="currentColor"
31-
stroke-width="2"
32-
stroke-linecap="round"
33-
stroke-linejoin="round"
31+
strokeWidth="2"
32+
strokeLinecap="round"
33+
strokeLinejoin="round"
3434
/>
3535
</motion.svg>
3636
);

0 commit comments

Comments
 (0)