fix: 히어로를 이전 디자인으로 되돌림, 밤 테마 시트 색, 열흘 날씨 줄 끌어 넘기기, 글자 선택 막기

This commit is contained in:
minaChoi committed 2026-10-06 17:19:40 +09:00
1 parent 6cc0a4d7b6
commit b61ed92c54
6 files changed
+180 -99

No files matched your search

+20 -4
View File
@@ -1,11 +1,12 @@
import { useState } from 'react'
import { useState, type ReactNode } from 'react'
import { useQuery } from '@tanstack/react-query'
import { getWeekOptions, getWeekRankingOptions, listEventsOptions, listPlacesOptions } from '../api/client/@tanstack/react-query.gen'
import { cx } from '../lib/utils'
import { cardBg, dateRange, loadOf, shortDay, sidoOf } from './lib'
import { useRegion } from './regionContext'
import { useSheet } from './sheetContext'
import { Chips, Ic, Rail, Sec, Skel, SkelRail, StateBox, Thumb } from './ui'
import { Arrows, Chips, Ic, Rail, Sec, Skel, SkelRail, StateBox, Thumb } from './ui'
import { useCarousel } from './carousel'
const TEN = Array.from({ length: 10 }, (_, i) => i)
const THREE = [0, 1, 2]
@@ -173,7 +174,7 @@ export function WeekPage() {
<section aria-label="주말·행사" aria-busy={weekLoad === 'loading'}>
<Sec title="열흘 날씨" sub="날짜를 누르면 그날 추천이 바뀌어요" />
{days.length ? (
<div className={cx('flex snap-x gap-1 overflow-x-auto px-3 pt-3 transition-opacity [scrollbar-width:none]', week.isPlaceholderData && 'opacity-60')} role="group" aria-label="날짜 고르기">
<DayStrip dim={week.isPlaceholderData}>
{days.map((d) => {
const on = d.day === sel?.day
const weekend = d.weekday === '토' || d.weekday === '일' || !!d.holiday
@@ -192,7 +193,7 @@ export function WeekPage() {
</button>
)
})}
</div>
</DayStrip>
) : weekLoad === 'loading' ? (
<>
<DaysSkel />
@@ -334,3 +335,18 @@ export function WeekPage() {
</section>
)
}
const DAY_STRIP = { align: 'start', dragFree: true, containScroll: 'trimSnaps' } as const
/** 열흘 날짜 줄: 손가락·마우스로 끌어 넘기고, PC 에선 화살표도 */
function DayStrip({ children, dim }: { children: ReactNode; dim: boolean }) {
const { ref, api, prev, next } = useCarousel(DAY_STRIP)
return (
<div className="relative" role="group" aria-label="날짜 고르기">
<div ref={ref} className="overflow-hidden">
<div className={cx('flex gap-1 px-3 pt-3 transition-opacity *:shrink-0', dim && 'opacity-60')}>{children}</div>
</div>
<Arrows api={api} prev={prev} next={next} />
</div>
)
}