import { View, Pressable, StyleSheet } from 'react-native'; import { Image } from 'expo-image'; import { Text } from '@/components/Text'; import { AstraLogo } from '@/components/AstraLogo'; import { colors, radius, spacing } from '@/theme'; import { albumArtworkSource } from '@/library/artwork'; import type { Album } from '@/types/library'; export function AlbumGridItem({ album, onPress }: { album: Album; onPress: () => void }) { const artUri = albumArtworkSource(album); return ( {artUri ? ( ) : ( )} {album.album} {album.artist} ); } const styles = StyleSheet.create({ item: { flex: 1, marginBottom: spacing.lg, }, art: { aspectRatio: 1, borderRadius: radius.md, backgroundColor: colors.bgTertiary, borderColor: colors.glassBorder, borderWidth: StyleSheet.hairlineWidth, alignItems: 'center', justifyContent: 'center', overflow: 'hidden', marginBottom: spacing.sm, }, artImage: { width: '100%', height: '100%', }, title: { fontSize: 14, }, });