import type { IndexSummary } from '@nalssigak/shared/api/client/types.gen'; import { MEDALS } from '@nalssigak/shared/lib'; import { LinearGradient } from 'expo-linear-gradient'; import { Pressable, View } from 'react-native'; import { Text } from '@/components/text'; import { Ic, Skel } from '@/components/ui'; import { useSheet } from '@/lib/sheet'; import { useSky } from '@/lib/sky'; // 가운데가 높은 3칸: 2위 · 1위 · 3위 const ORDER = [1, 0, 2] as const; const FLEX = [1.15, 1, 1]; /** 1~3위 받침대와 같은 칸의 스켈레톤 */ export function PodiumSkel() { return ( {ORDER.map((k) => ( ))} ); } export function Podium({ top, dim }: { top: IndexSummary[]; dim: boolean }) { const { open } = useSheet(); const { kind } = useSky(); return ( {ORDER.map((k) => { const g = top[k]; return ( open({ type: 'gak', indexId: g.index_id })} className={`items-center overflow-hidden rounded-3xl border-b-[6px] border-shade bg-card px-1.5 ${k === 0 ? 'py-4' : 'mt-6 py-3'}`}> {k === 0 && kind !== 'night' && } {k + 1}위 {g.name} {g.score} {!!g.summary && {g.summary}} ); })} ); }