diff --git a/.husky/pre-commit b/.husky/pre-commit index 3e079c93..f12f9c15 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,4 +4,4 @@ . "$(dirname "$0")/_/husky.sh" echo "✅ Lint-staged 시작..." -yarn lint-staged +npx lint-staged diff --git a/package.json b/package.json index 421a2590..d471b175 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "prepare": "husky" }, "lint-staged": { + "ignore": ["src/legacy-components/**"], "src/**/*.{js,jsx,ts,tsx}": [ "eslint --fix --cache", "prettier --write" diff --git a/src/amplitude.d.ts b/src/amplitude.d.ts new file mode 100644 index 00000000..7391b50d --- /dev/null +++ b/src/amplitude.d.ts @@ -0,0 +1,8 @@ +declare global { + interface Window { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + amplitude: any; + } + } + + export {}; \ No newline at end of file diff --git a/src/assets/icons/AddIcon.svg b/src/assets/icons/AddIcon.svg new file mode 100644 index 00000000..27388f27 --- /dev/null +++ b/src/assets/icons/AddIcon.svg @@ -0,0 +1,7 @@ + diff --git a/src/common/CheckList.tsx b/src/common/CheckList.tsx index d12af0c9..1ab3ac2c 100644 --- a/src/common/CheckList.tsx +++ b/src/common/CheckList.tsx @@ -10,6 +10,8 @@ import { useDeleteTodoMutation } from '@hook/todo/useDeleteTodoMutation'; import { ReactTagManager } from 'react-gtm-ts'; import { useAddTodoMutation } from '@hook/todo/useAddTodoMutation.ts'; import Plus from '@assets/icons/plus.svg?react'; +import AddIcon from '@assets/icons/AddIcon.svg?react'; +import BookMarkIcon from '@assets/icons/bookmark.svg?react'; import { useUpdateTodoMutation } from '@hook/todo/useUpdateTodoMutation.ts'; type ChecklistItem = string | { id?: number; text: string }; @@ -72,6 +74,17 @@ const CheckList = ({ if (!trimmedText) return; if (isAddingNew) { + // Amplitude 이벤트 - 할일 추가 시도 (inpage) + if (window.amplitude) { + window.amplitude.track('todo_create', { + source_method: 'inpage', + source_page: window.location.pathname, + todo_length: trimmedText.length, + timestamp: new Date().toISOString(), + }); + console.log('Amplitude event sent: todo_create_attempt (inpage)'); + } + mutate( { todoTitle: trimmedText }, { @@ -222,7 +235,7 @@ const CheckList = ({