import type { IndexSummary } from '@nalssigak/shared/api/client/types.gen'; import { Pressable, View } from 'react-native'; import { Text } from '@/components/text'; import { Ic, Skel } from '@/components/ui'; import { useSheet } from '@/lib/sheet'; const CELL = 'w-[32%] items-center rounded-[22px] border-b-[5px] border-shade bg-card px-1.5 pt-3 pb-2.5'; const SKELS = Array.from({ length: 9 }, (_, i) => i); export function GridSkel() { return ( {SKELS.map((i) => ( ))} ); } /** 3칸 바둑판. 지금 시간대가 아니거나 제철이 아닌 각은 흐리게 */ export function GakGrid({ items, dim }: { items: IndexSummary[]; dim: boolean }) { const { open } = useSheet(); return ( {items.map((g) => ( open({ type: 'gak', indexId: g.index_id })} accessibilityLabel={g.active ? `${g.rank}위 ${g.name} ${g.score}점` : `${g.name}, ${g.in_season === false ? '제철 아님' : '지금 시간대 아님'}`} className={`${CELL} ${g.active ? '' : 'opacity-55'}`} > {g.active && {g.rank}} {!!g.season && {g.season}} {g.name} {g.active ? ( {g.score} ) : ( {g.in_season === false ? '제철 아님' : '지금 아님'} )} ))} ); }