feat: 오른쪽 아래 문의·맨 위로 버튼과 문의 창 — 맨 위에서는 문의(전화·이메일 안내 창), 내리면 맨 위로 버튼으로 바뀜. 쇼츠 화면은 제외 (GA top_button·contact_click, sheet_open contact)

This commit is contained in:
skkim committed 2026-11-11 10:55:20 +09:00
1 parent f5bf98fb34
commit 4a2da04f98
9 files changed
+88 -3

No files matched your search

+46 -1
View File
@@ -92,7 +92,7 @@ export function SheetProvider({ children }: { children: ReactNode }) {
)
}
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기', tarot: '오늘 타로', level: '내 레벨', levelUp: '레벨이 올랐어요', gameHelp: '구름 합치기 하는 법' } as const
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기', tarot: '오늘 타로', level: '내 레벨', levelUp: '레벨이 올랐어요', gameHelp: '구름 합치기 하는 법', contact: '날씨각 문의' } as const
/** 아래에서 올라오는 창: 네이티브 <dialog>라 ESC·포커스 가두기·포커스 되돌리기가 기본으로 된다 */
function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void }) {
@@ -183,6 +183,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
{shown.type === 'level' && <LevelSheet />}
{shown.type === 'levelUp' && <LevelUpSheet level={shown.level} />}
{shown.type === 'gameHelp' && <GameHelpSheet />}
{shown.type === 'contact' && <ContactSheet onDone={onClose} />}
</div>
)}
</dialog>
@@ -554,6 +555,50 @@ function GameHelpSheet() {
)
}
const CONTACTS = [
{ method: 'phone', label: '전화 문의', value: '010-2755-6463', href: 'tel:010-2755-6463', icon: 'M6.6 3h3l1.5 4.2-2 1.5a12 12 0 0 0 6.2 6.2l1.5-2L21 14.4v3A2.6 2.6 0 0 1 18.4 20 15.4 15.4 0 0 1 4 5.6 2.6 2.6 0 0 1 6.6 3Z' },
{ method: 'email', label: '이메일 문의', value: 'sales@o2o.kr', href: 'mailto:sales@o2o.kr', icon: 'M3.5 6.5h17v11h-17zM4 7l8 6.5L20 7' },
] as const
/** 오른쪽 아래 문의 버튼으로 여는 창: 운영사 소개와 전화·이메일 */
function ContactSheet({ onDone }: { onDone: () => void }) {
return (
<Body className="flex flex-col items-center text-center">
<img src="/b/aio2o.png" alt="AIO2O" width={162} height={27} className="mt-1 block h-[27px] w-auto" />
<h4 className="mt-3 mb-0 font-jua text-[22px] font-normal">무엇을 도와드릴까요?</h4>
<p className="mt-1.5 mb-0 text-[13.5px] leading-[1.6] font-semibold text-(--ink2)">
날씨각은 에이아이오투오가 만듭니다.
<br />
AI로 생활에 유용한 정보를 연결하고,
<br />
산업 현장의 문제를 해결합니다.
</p>
<div className="mt-4 flex w-full flex-col gap-2">
{CONTACTS.map((c) => (
<a key={c.method} href={c.href} onClick={() => track('contact_click', { method: c.method })} className="flex items-center gap-3 rounded-[16px] bg-[#f3f6fb] p-3 text-left text-(--ink)">
<span className="b-keep-bg grid size-11 shrink-0 place-items-center rounded-full bg-white text-(--orange)">
<svg viewBox="0 0 24 24" className="size-[22px]" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d={c.icon} />
</svg>
</span>
<span className="flex min-w-0 flex-1 flex-col">
<span className="text-[12px] font-bold text-(--ink2)">{c.label}</span>
<span className="truncate text-[17px] font-extrabold">{c.value}</span>
</span>
<span className="text-xl text-(--orange)" aria-hidden="true">
›
</span>
</a>
))}
</div>
<p className="mt-3.5 mb-0 text-[12px] font-semibold text-(--ink3)">주식회사 에이아이오투오 · AIO2O</p>
<button type="button" onClick={onDone} className="mt-3 w-full cursor-pointer rounded-[14px] bg-(--orange) p-3 text-[15px] font-extrabold text-white">
확인
</button>
</Body>
)
}
function SeasonWeekSheet() {
const { open } = useSheet()
const q = useQuery(getSeasonWeekOptions())