feat: 구름 합치기 GA4 이벤트 — game_start(첫 그림)·game_round(라운드 깸)·game_over(넘침)

This commit is contained in:
minaChoi committed 2026-10-29 09:04:11 +09:00
1 parent 63b4fa74fe
commit df3fba720c
26 files changed
+330 -900

No files matched your search

+1 -34
View File
@@ -37,8 +37,7 @@ import { InstallSheet } from './installBanner'
import { ARTICLE_CAT, SHEET_CLOSE_MS, SHEET_OPEN_MS } from './lib'
import { MixSheet, MyGakSheet } from './myGak'
import { TarotSheet } from './fortune'
import { LevelCard, LevelSheet, LevelUpSheet, useCloseAndGo, useShareReward } from './level'
import { BIRTH_PLACES, useAccountBirth, useBirth, useSaveBirth } from './sajuBirth'
import { LevelCard, LevelSheet, LevelUpSheet, useShareReward } from './level'
import { ownPage, useRegion } from './regionContext'
import { WeatherWhySheet } from './weatherWhy'
import { useSky } from './skyContext'
@@ -49,34 +48,6 @@ import { HeartIcon } from './svg'
import { MyTalks, TalkSheet } from './talk'
import { Avatar, Ic, Skel, StateBox, TAP44, Thumb } from './ui'
/** 내 정보: 계정에 저장한 생년월일 (날씨 사주) */
function MyBirth() {
useAccountBirth()
const birth = useBirth()
const save = useSaveBirth()
const go = useCloseAndGo()
const place = BIRTH_PLACES.find(([k]) => k === birth?.place)?.[1]
return (
<section aria-label="내 생년월일" className="flex items-center gap-2.5 rounded-2xl bg-[#f6f8fc] px-3.5 py-3">
<Ic name="yin_yang" className="size-7 shrink-0" />
<div className="min-w-0 flex-1">
<p className="m-0 text-[13px] font-extrabold">내 생년월일</p>
<p className="m-0 truncate text-xs font-semibold text-(--ink2)">
{birth ? `${birth.y}.${birth.m}.${birth.d}${birth.hour != null ? ` ${birth.hour}시 ${birth.minute ?? 0}분` : ''}${place ? ` · ${place}` : ''}` : '넣어 두면 날씨 사주를 바로 볼 수 있어요'}
</p>
</div>
<button type="button" onClick={() => go('/saju')} className="shrink-0 cursor-pointer text-xs font-extrabold text-(--orange)">
{birth ? '사주 보기' : '넣기'}
</button>
{birth && (
<button type="button" onClick={() => save(null)} className="shrink-0 cursor-pointer text-xs font-extrabold text-(--ink3)">
지우기
</button>
)}
</section>
)
}
export function SheetProvider({ children }: { children: ReactNode }) {
const [state, setState] = useState<SheetState>(null)
// 창이 열려 있는 동안 방문 기록을 하나 쌓아 두어 뒤로 가기가 창만 닫게 한다
@@ -156,14 +127,11 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
const root = document.documentElement
const before = root.style.overflow
root.style.overflow = 'hidden'
// 창 안에서 끝까지 밀어도 뒤 페이지로 넘어가지 않게
root.style.overscrollBehavior = 'none'
// 뒤 화면 움직임 멈추기는 페이지 전체 스타일을 다시 계산하게 해서, 창이 다 올라온 뒤에 한다
const pause = setTimeout(() => root.classList.add('b-sheet-open'), SHEET_OPEN_MS)
return () => {
clearTimeout(pause)
root.style.overflow = before
root.style.overscrollBehavior = ''
root.classList.remove('b-sheet-open')
}
}, [isOpen])
@@ -1233,7 +1201,6 @@ function MeSheet({ onDone }: { onDone: () => void }) {
<p className="m-0 text-center text-sm font-semibold text-(--ink2)">{me.provider === AuthProvider.TOSS ? '토스로 로그인했어요' : me.provider === AuthProvider.GOOGLE ? '구글 계정으로 로그인했어요' : `${me.login_id}(으)로 로그인했어요`}</p>
</div>
<LevelCard />
<MyBirth />
{installable && (
<button type="button" onClick={() => install('menu')} className="cursor-pointer rounded-2xl bg-[#fff4ec] py-2.5 font-jua text-[15.5px] text-(--orange)">
📲 홈 화면에 추가