feat: 새 기능 GA4 이벤트 — 창 열기·좋아요·댓글·신고·차단·약관 동의·이야기 글쓰기·히어로 오늘/내일·쇼츠·단풍 지도·내 각·토스 인트로·설치 띠 닫기
This commit is contained in:
1 parent
1489030c5f
commit
728b24a0c9
13 files changed
+110
-18
No files matched your search
@@ -7,6 +7,7 @@ import type { MyGakRule, MyGakScore } from '@nalssigak/shared/api/client/types.g
|
||||
import { useAuth } from './authContext'
|
||||
import { useRegion } from './regionContext'
|
||||
import { useSheet } from './sheetContext'
|
||||
import { track } from '../lib/analytics'
|
||||
|
||||
const KEY = 'nalssigak.b.myRule'
|
||||
|
||||
@@ -121,7 +122,16 @@ export function useMyGak() {
|
||||
const create = (g: MyGak, onDone?: () => void) => {
|
||||
const item = { name: gakName(g.name), icon: g.icon, rule: g.rule }
|
||||
if (loggedIn) {
|
||||
add.mutate({ body: item }, { onSuccess: (res) => res.result?.success && onDone?.() })
|
||||
add.mutate(
|
||||
{ body: item },
|
||||
{
|
||||
onSuccess: (res) => {
|
||||
if (!res.result?.success) return
|
||||
track('my_gak_save', { gak_name: item.name })
|
||||
onDone?.()
|
||||
},
|
||||
},
|
||||
)
|
||||
return
|
||||
}
|
||||
if (saved) {
|
||||
@@ -129,6 +139,7 @@ export function useMyGak() {
|
||||
return
|
||||
}
|
||||
setLocal(item)
|
||||
track('my_gak_save', { gak_name: item.name })
|
||||
onDone?.()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user