feat: 앱 시트·로그인 상태·지역 저장 틀, 공통 UI(Avatar·Chips·Rows·Credit)

This commit is contained in:
minaChoi committed 2026-10-14 14:29:20 +09:00
1 parent e52f93fdbb
commit 28ff032160
8 files changed
+202 -15

No files matched your search

+9 -1
View File
@@ -8,6 +8,7 @@ import { LinearGradient } from 'expo-linear-gradient';
import Svg, { Defs, Path, RadialGradient, Rect, Stop } from 'react-native-svg';
import { Ic, Skel } from '@/components/ui';
import { useSheet } from '@/lib/sheet';
import { useSky } from '@/lib/sky';
type Mode = 'now' | TimeKind;
@@ -48,6 +49,7 @@ function heroVal(load: Load, v: ReactNode, skel: string) {
type Props = { hero?: HeroData | null; today?: ResWeatherToday; ranked: TopIndex[]; feedLoad: Load; todayLoad: Load };
export function Hero({ hero, today, ranked, feedLoad, todayLoad }: Props) {
const { open } = useSheet();
const { preview, setServerKind, setPreview } = useSky();
const mode: Mode = preview ?? 'now';
const t = kst(useNow());
@@ -112,7 +114,13 @@ export function Hero({ hero, today, ranked, feedLoad, todayLoad }: Props) {
</View>
</View>
<View className="items-center">
{bubble ? <Text className={`text-center font-jua text-[24px] leading-tight ${text}`}>{bubble}</Text> : <Skel className="h-6 w-[160px]" />}
{bubble ? (
<Pressable disabled={!top1} onPress={() => top1 && open({ type: 'gak', indexId: top1.index_id })} accessibilityLabel={top1 ? `${bubble} 1위 ${top1.name} ${top1.score}점, 계산 근거 보기` : undefined}>
<Text className={`text-center font-jua text-[24px] leading-tight ${text}`}>{bubble}</Text>
</Pressable>
) : (
<Skel className="h-6 w-[160px]" />
)}
{top1?.summary ? <Text className={`mt-0.5 text-center text-[15px] font-bold opacity-80 ${text}`}>{top1.summary}</Text> : feedLoad === 'loading' ? <Skel className="mt-1 w-[140px]" /> : null}
{/* 상태 한 줄: 습도·불쾌지수·자외선·미세먼지 단계 이름. 조심할 것만 색 */}
{status.length > 0 && (