diff --git a/frontend/index.html b/frontend/index.html index 1ff2d06..dde21b1 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -96,6 +96,11 @@ /> + +
+ +

날씨 불러오는 중…

+

날씨각

diff --git a/frontend/src/b/BLayout.tsx b/frontend/src/b/BLayout.tsx index 7693069..fca9a25 100644 --- a/frontend/src/b/BLayout.tsx +++ b/frontend/src/b/BLayout.tsx @@ -3,7 +3,7 @@ import { NavLink, Outlet, useLocation } from 'react-router' import { useIsFetching, useQuery } from '@tanstack/react-query' import { getSeasonWeekOptions } from '../api/client/@tanstack/react-query.gen' import { cx } from '../lib/utils' -import { kindOfHour, kst, type TimeKind } from './lib' +import { kindOfHour, kst, seasonOf, type TimeKind } from './lib' import './b.css' import { AuthProvider } from './auth' import { RegionProvider } from './region' @@ -24,10 +24,6 @@ const TABS = [ { to: '/season', key: 'season', label: '계절·상식', title: '계절·상식' }, ] as const -// 달(1~12) → 계절 이름과 아이콘 -const SEASONS: [string, string][] = [['겨울', 'snow'], ['봄', 'garden'], ['여름', 'sun'], ['가을', 'maple']] -const seasonOf = (month: number) => SEASONS[Math.floor((month % 12) / 3)] - /** 로고 옆 계절 칩: 계절 이름과 지금 절기. 누르면 이번 주 절기 창. 좁은 화면에선 절기를 뺀다 */ function SeasonChip() { const { open } = useSheet() @@ -184,6 +180,8 @@ function FirstLoad() { // 받기 시작했다가 받는 게 없어지면 끝 (렌더 중에 바로 맞춘다) if (fetching > 0 && !started) setStarted(true) if (fetching === 0 && started && !done) setDone(true) + // 앱이 떴으니 index.html 의 첫 화면은 걷는다 (이 덮개가 이어받는다) + useEffect(() => document.getElementById('boot')?.remove(), []) // 느린 망에서도 10초 넘게 막지 않는다 (그 뒤는 화면 안 스켈레톤이 맡는다) useEffect(() => { const id = setTimeout(() => setDone(true), 10000)