feat: 시안 B 화면을 기본 화면으로, Hey API로 백엔드 연결

- 예전 화면(/, /a)과 목업 데이터를 지우고 시안 B 를 / 로
- @hey-api/openapi-ts 로 타입·TanStack Query 함수 생성, 토큰·401 갱신 처리
- 공유는 기본 공유창, 없으면 링크 복사

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 5.5 committed 2026-10-02 11:32:22 +09:00
1 parent e134295ce5
commit f8b47f064a
147 files changed
+12350

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { RainType, Sky, type WeatherSlot } from '../api/client/types.gen'
import { kst } from './lib'
const RAIN_TEXT: Partial<Record<RainType, string>> = { [RainType.RAIN]: '비', [RainType.SLEET]: '진눈깨비', [RainType.SNOW]: '눈', [RainType.SHOWER]: '소나기' }
const SKY_TEXT: Record<Sky, string> = { [Sky.CLEAR]: '맑음', [Sky.PARTLY]: '구름 많음', [Sky.CLOUDY]: '흐림' }
/** 칸 하나의 하늘 상태 한 마디: 비·눈이 오면 그걸, 아니면 하늘 */
export function skyText(slot: WeatherSlot) {
return (slot.rain_type != null && RAIN_TEXT[slot.rain_type]) || (slot.sky != null ? SKY_TEXT[slot.sky] : slot.note)
}
/** 주어진 시(0~23)를 넘지 않는 마지막 칸 */
export function slotAt(slots: WeatherSlot[], hour: number) {
let pick: WeatherSlot | undefined
for (const s of slots) if (kst(s.at).h <= hour) pick = s
return pick ?? slots[0]
}
export const deg = (v: number | null | undefined) => (v == null ? '-' : `${Math.round(v)}°`)