Skip to content

Commit 043f09f

Browse files
committed
fix: 다가오는 일정이 클릭되는 버그 수정
1 parent 46994e5 commit 043f09f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

components/home/CheckItem.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export function CheckItem({
1616
checkbox,
1717
}: CheckItemProps) {
1818
return (
19-
<button
20-
type="button"
21-
onClick={onToggle}
19+
<div
20+
role="button"
21+
onClick={checkbox ? onToggle : undefined}
22+
aria-disabled={!checkbox}
2223
className={[
2324
'flex w-full items-center gap-2.5 rounded-2xl border px-4 py-2 text-left transition',
2425
'bg-gray-50 hover:bg-gray-100',
@@ -52,6 +53,6 @@ export function CheckItem({
5253
>
5354
{text}
5455
</span>
55-
</button>
56+
</div>
5657
);
5758
}

components/home/CheckList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type CheckableItem = {
1010

1111
type CheckListProps<T extends CheckableItem> = {
1212
items: T[];
13-
onToggleTodo: (id: string, checked: boolean) => void;
13+
onToggleTodo: (id: string, current: boolean) => void;
1414
emptyText?: string;
1515
checkbox?: boolean;
1616
};

0 commit comments

Comments
 (0)