diff --git a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx index 92fea11..834ee31 100644 --- a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx +++ b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx @@ -9,7 +9,7 @@ import { useAndroidScreenPalette, } from "@/contexts/android-tab-theme" import { MusicEntityView } from "@/components/music-entity-view" -import { Stack, useIsFocused, useLocalSearchParams } from "expo-router" +import { Link, Stack, useIsFocused, useLocalSearchParams } from "expo-router" import { StatusBar } from "expo-status-bar" import { memo, useCallback, useEffect, useMemo } from "react" import { Platform, Pressable, StyleSheet, View } from "react-native" @@ -149,6 +149,7 @@ export default function AlbumScreen() { }} /> - + + + + + - + + + + + { - push(`/album/${album.id}`) - }, [push, album.id]) if (!config) return null const card = ( - - - - {album.title} - - - {album.artist.name} - - + + + + + + + + + + {album.title} + + + {album.artist.name} + + + + ) return ( @@ -83,9 +89,7 @@ export const AlbumCard = memo(function AlbumCard({ share={{ type: "album", albumId: album.id, title: album.title }} onAction={(action) => void handleAlbumAction(album, action)} > - - {card} - + {card} ) }) @@ -142,35 +146,40 @@ export const PlaylistCard = memo(function PlaylistCard({ playlist: PlaylistSummary width?: number }) { - const { push } = useAppNavigation() + const { href } = useAppNavigation() const { config } = useServerConfig() const colors = useThemeColors() const { handlePlaylistAction } = useMediaMenuActions() - const onPress = useCallback(() => { - push(`/playlist/${playlist.id}`) - }, [push, playlist.id]) if (!config) return null const card = ( - - - - {playlist.title} - - - {playlist.owner} - - + + + + + + + + + + {playlist.title} + + + {playlist.owner} + + + + ) return ( @@ -183,9 +192,7 @@ export const PlaylistCard = memo(function PlaylistCard({ }} onAction={(action) => void handlePlaylistAction(playlist, action)} > - - {card} - + {card} ) }) diff --git a/apps/mobile/components/skeletons.tsx b/apps/mobile/components/skeletons.tsx index cacb8cc..147d8dc 100644 --- a/apps/mobile/components/skeletons.tsx +++ b/apps/mobile/components/skeletons.tsx @@ -1,3 +1,4 @@ +import { Link } from "expo-router" import Reanimated from "react-native-reanimated" import { useEffect, useRef, type ReactNode, type ComponentProps } from "react" import { @@ -198,18 +199,20 @@ export function HomeSkeleton() { /** Album and playlist pages: cover, title, play buttons, then tracks. */ export function CollectionDetailSkeleton({ + zoomCoverSize, style, round = false, backgroundColor, onLayout, }: { + zoomCoverSize?: number style?: ComponentProps["style"] round?: boolean backgroundColor?: string onLayout?: () => void }) { const colors = useThemeColors() - const coverSize = round ? 180 : 210 + const coverSize = zoomCoverSize ?? (round ? 180 : 210) return ( - + {zoomCoverSize ? ( + + + + + + ) : ( + + )}